Add manufacturer to edit form
This commit is contained in:
@@ -38,6 +38,7 @@ class ModelsController extends AdminController {
|
||||
{
|
||||
// Show the page
|
||||
$depreciation_list = array('' => 'Do Not Depreciate') + Depreciation::lists('name', 'id');
|
||||
$manufacturer_list = array('' => 'N/A') + Manufacturer::lists('name', 'id');
|
||||
$category_list = array('' => '') + DB::table('categories')->lists('name', 'id');
|
||||
return View::make('backend/models/edit')->with('category_list',$category_list)->with('depreciation_list',$depreciation_list)->with('model',new Model);
|
||||
}
|
||||
|
||||
@@ -50,6 +50,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Manufacturer -->
|
||||
<div class="control-group {{ $errors->has('manufacturer_id') ? 'error' : '' }}">
|
||||
<label class="control-label" for="parent">Manufacturer</label>
|
||||
<div class="controls">
|
||||
{{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $model->manufacturer_id), array('class'=>'select2', 'style'=>'width:250px')) }}
|
||||
{{ $errors->first('manufacturer_id', '<span class="help-inline">:message</span>') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Depreciation -->
|
||||
<div class="control-group {{ $errors->has('depreciation_id') ? 'error' : '' }}">
|
||||
|
||||
Reference in New Issue
Block a user