{{-- Name: manualChapter.editForm Author: JH2 Created: 2015-05-28 --}} @extends('partials.box') @section($content_id) {!! Form::model($chapter, ['route' => ['manual-chapter.update', $chapter->id], 'method' => 'PATCH', 'class' => 'form-horizontal']) !!}
{!! Form::label('status', Lang::get('manual.form.status'), ['class' => 'col-md-4 control-label']) !!}
{!! Form::select('status', ManualChapter::_get('status'), $chapter->status, ['class' => 'form-control']) !!} {!! $errors->first('status', ':message') !!}
{!! Form::label('sort_order', Lang::get('manual.form.sort_order'), ['class' => 'col-md-4 control-label']) !!}
{!! Form::input('number', 'sort_order', $chapter->sort_order, ['class' => 'form-control', 'min' => '0']) !!} {!! $errors->first('sort_order', ':message') !!}
{!! Form::label('title', Lang::get('manual.form.title'), ['class' => 'col-md-4 control-label']) !!}
{!! Form::text('title', $chapter->title, ['class' => 'form-control']) !!} {!! $errors->first('title', ':message') !!}
{!! Form::label('code', Lang::get('manual.form.code'), ['class' => 'col-md-4 control-label']) !!}
{!! Form::text('code', $chapter->code, ['class' => 'form-control']) !!} {!! $errors->first('code', ':message') !!}
{!! Form::label('content', Lang::get('manual.form.content'), ['class' => 'col-md-4 control-label']) !!}
{!! Form::textArea('content', $chapter->content, ['class' => 'form-control']) !!} {!! $errors->first('content', ':message') !!}
{!! Form::label('update_user_id', Lang::get('manual.form.lastUpdated'), ['class' => 'col-md-4 control-label']) !!}
{!! Form::text('update_user_id', (!empty($chapter->last_content_update_user_id) ? User::find($chapter->last_content_update_user_id)->username : ''), ['class' => 'form-control', 'readonly', 'placeholder' => Lang::get('manual.form.lastUpdatedUser')]) !!}
{!! Form::text('content_update_time', (!empty($chapter->last_content_update_time) ? $chapter->last_content_update_time : ''), ['class' => 'form-control', 'readonly', 'placeholder' => Lang::get('manual.form.lastUpdatedDate')]) !!}

{!! Form::submit(Lang::get('manual.form.save'), ['class' => 'btn btn-primary']) !!} {!! Form::close() !!} {{ Lang::get('manual.form.abort') }} {!! Form::open([ 'class' => 'pull-left margin-left delete-form', 'method' => 'delete', 'route' => ['manual-chapter.destroy', $chapter->id], ]) !!} {!! Form::submit(Lang::get('manual.form.delete'), ['class' => 'btn btn-danger' ,'data' => 'delete-confirm']) !!} {!! Form::close() !!}
@stop