@extends('layouts.default') @extends('content_wrappers.md-10') @section('title', ' | Edit '.$recipe->name) @section('heading', 'Edit Recipe: '.$recipe->name) @section('content')
{{ Form::model($recipe, array('route' => array('recipes.update', $recipe->id), 'method' => 'PUT', 'id' => 'recipeForm')) }}
{{ Form::label('name', 'Recipe Name:') }} {{ Form::text('name', null, array('class' => 'form-control', 'id' => 'name')) }}
{{ Form::label('author', 'Created By:') }} {{ Form::text('author', null, array('class' => 'form-control', 'id' => 'authorFilter')) }}
{{ Form::label('user_id', 'Maintained By:') }}
Entered On: {{$recipe->date_entered->format('Y/m/d') }}
Last Changed: {{$recipe->date_modified->format('Y/m/d') }}
{{ Form::label('servings', 'Servings:') }} {{ Form::text('servings', null, array('class' => 'form-control','id' => 'servings')) }}
{{ Form::label('servings', 'Serving Size:') }} {{ Form::text('serving_size', null, array('class' => 'form-control','id' => 'serving_size')) }}

Categories

@foreach ($recipe->categories as $category) {{ Form::hidden('category_'.$category->id.'_name', $category->name, array('class' => 'form-control category_name')) }} {{ Form::button(ucwords($category->name), array('class' => 'btn form-control category_button','style'=>'width:100px;margin-left:10px;margin-bottom:10px;'))}} @endforeach
{{ Form::button("Add", array('id'=>'addCategory','class'=>'form-control'))}}

Description

{{ Form::textarea('description', $recipe->description, array('class' => 'form-control', 'id' => 'descriptionEditor')) }}

Ingredients

@foreach ($recipe->ingredients as $index => $ingredient) @endforeach
Order Alternative? Quantity Measurement Name           Notes
{{Form::hidden("ingredient_".$ingredient->id."_order",$ingredient->order,array('class' => 'form-control ingredientOrder'))}} @if($index == 0) {{Form::checkbox("ingredient_".$ingredient->id."_alternative",null,$ingredient->alternative,array('class' => 'form-control ingredientAlternative','disabled'))}} @else {{Form::checkbox("ingredient_".$ingredient->id."_alternative",null,$ingredient->alternative,array('class' => 'form-control ingredientAlternative'))}} @endif {{Form::text("ingredient_".$ingredient->id."_quantity",$ingredient->quantity,array('class' => 'form-control ingredientQuantity'))}} {{Form::text("ingredient_".$ingredient->id."_measurement",$ingredient->measurement,array('class' => 'form-control ingredientMeasurement'))}} {{Form::text("ingredient_".$ingredient->id."_name",$ingredient->name,array('class' => 'form-control ingredientName'))}} {{Form::text("ingredient_".$ingredient->id."_notes",$ingredient->special_notes,array('class' => 'form-control ingredientNotes'))}} {{Form::button("Remove",array('class' => 'form-control ingredientRemove'))}}
{{Form::checkbox(null,null,false,array('class' => 'form-control ingredientAlternative','id'=>'addIngredientAlternative'))}} {{Form::text(null,null,array('class' => 'form-control ingredientQuantity'))}} {{Form::text(null,null,array('class' => 'form-control ingredientMeasurement'))}} {{Form::text(null,null,array('class' => 'form-control ingredientName'))}} {{Form::text(null,null,array('class' => 'form-control ingredientNotes'))}} {{Form::button("Add",array('class' => 'form-control','id' => 'addIngredient'))}}


Instructions

{{ Form::textarea('instructions', $recipe->instructions, array('class' => 'form-control', 'id' => 'instructionsEditor')) }}
{{ Form::submit('Update Recipe', array('class' => 'btn btn-primary','id'=>'submit')) }} {{ Form::close() }} @endsection @section('scripts') @endsection @section('styles') @endsection