92 lines
3.4 KiB
PHP
Executable File
92 lines
3.4 KiB
PHP
Executable File
@extends('backend/layouts/default')
|
|
|
|
{{-- Page title --}}
|
|
@section('title')
|
|
@if ($model->id)
|
|
Update Model
|
|
@else
|
|
Create Model
|
|
@endif
|
|
@parent
|
|
@stop
|
|
|
|
{{-- Page content --}}
|
|
@section('content')
|
|
<div class="row header">
|
|
<div class="col-md-12">
|
|
<a href="{{ route('models') }}" class="btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
|
|
<h3>
|
|
@if ($model->id)
|
|
Update Model
|
|
@else
|
|
Create New Model
|
|
@endif
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row form-wrapper">
|
|
|
|
|
|
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
|
<!-- CSRF Token -->
|
|
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
|
|
|
|
|
|
|
<!-- Model name -->
|
|
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
|
<label for="name" class="col-md-2 control-label">Model Name</label>
|
|
<div class="col-md-7">
|
|
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $model->name) }}" />
|
|
{{ $errors->first('name', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Model No. -->
|
|
<div class="form-group {{ $errors->has('modelno') ? ' has-error' : '' }}">
|
|
<label for="modelno" class="col-md-2 control-label">Model No.</label>
|
|
<div class="col-md-7">
|
|
<input class="form-control" type="text" name="modelno" id="modelno" value="{{ Input::old('modelno', $model->modelno) }}" />
|
|
{{ $errors->first('modelno', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group {{ $errors->has('manufacturer_id') ? ' has-error' : '' }}">
|
|
<label for="manufacturer_id" class="col-md-2 control-label">Manufacturer</label>
|
|
<div class="col-md-7">
|
|
{{ Form::select('manufacturer_id', $manufacturer_list , Input::old('manufacturer_id', $model->manufacturer_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
|
{{ $errors->first('manufacturer_id', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Depreciation -->
|
|
<div class="form-group {{ $errors->has('depreciation_id') ? ' has-error' : '' }}">
|
|
<label for="depreciation_id" class="col-md-2 control-label">Depreciation</label>
|
|
<div class="col-md-7">
|
|
{{ Form::select('depreciation_id', $depreciation_list , Input::old('depreciation_id', $model->depreciation_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
|
{{ $errors->first('depreciation_id', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Category -->
|
|
<div class="form-group {{ $errors->has('category_id') ? ' has-error' : '' }}">
|
|
<label for="category_id" class="col-md-2 control-label">Category</label>
|
|
<div class="col-md-7">
|
|
{{ Form::select('category_id', $category_list , Input::old('category_id', $model->category_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
|
{{ $errors->first('category_id', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Form actions -->
|
|
<div class="form-group">
|
|
<label class="col-md-2 control-label"></label>
|
|
<div class="col-md-7">
|
|
<a class="btn btn-link" href="{{ route('models') }}">Cancel</a>
|
|
<button type="submit" class="btn btn-success"><i class="icon-ok icon-white"></i> @lang('general.save')</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
@stop
|