Form cleanup

This commit is contained in:
snipe 2016-07-22 02:11:57 -07:00
parent 1f85f4b337
commit a1640d7fe3
8 changed files with 96 additions and 96 deletions

View file

@ -40,9 +40,9 @@
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
<div class="col-md-3">
{{ Form::label('name', trans('admin/categories/general.category_name')) }}
<i class='fa fa-asterisk'></i>
</div>
<div class="col-md-9">
<div class="col-md-8 required">
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $category->name) }}" />
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
@ -52,9 +52,8 @@
<div class="form-group {{ $errors->has('category_type') ? ' has-error' : '' }}">
<div class="col-md-3">
{{ Form::label('category_type', trans('general.type')) }}
<i class='fa fa-asterisk'></i>
</div>
<div class="col-md-7">
<div class="col-md-7 required">
{{ Form::select('category_type', $category_types , Input::old('category_type', $category->category_type), array('class'=>'select2', 'style'=>'min-width:350px', $category->itemCount() > 0 ? 'disabled' : '')) }}
{!! $errors->first('category_type', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
@ -65,7 +64,7 @@
<div class="col-md-3">
{{ Form::label('eula_text', trans('admin/categories/general.eula_text')) }}
</div>
<div class="col-md-9">
<div class="col-md-8">
{{ Form::textarea('eula_text', Input::old('eula_text', $category->eula_text), array('class' => 'form-control')) }}
<p class="help-block">{!! trans('admin/categories/general.eula_text_help') !!} </p>
<p class="help-block">{!! trans('admin/settings/general.eula_markdown') !!} </p>

View file

@ -42,26 +42,14 @@
</div><!-- /.box-header -->
<div class="box-body">
<!-- Company -->
@if (\App\Models\Company::isCurrentUserAuthorized())
<div class="form-group {{ $errors->has('company_id') ? ' has-error' : '' }}">
<div class="col-md-3">
{{ Form::label('company_id', trans('general.company')) }}
</div>
<div class="col-md-7">
{{ Form::select('company_id', $company_list , Input::old('company_id', $component->company_id), array('class'=>'select2', 'style'=>'width:350px')) }}
{!! $errors->first('company_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
@endif
<!-- Name -->
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
<div class="col-md-3">
{{ Form::label('name', trans('admin/components/table.title')) }} *
</div>
<div class="col-md-9">
{{ Form::label('name', trans('admin/components/table.title'), array('class' => 'col-md-3 control-label')) }}
<div class="col-md-8 required">
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $component->name) }}" />
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
@ -69,21 +57,64 @@
<!-- Category -->
<div class="form-group {{ $errors->has('category_id') ? ' has-error' : '' }}">
<div class="col-md-3">
{{ Form::label('category_id', trans('general.category')) }} *
</div>
<div class="col-md-7">
{{ Form::label('category_id', trans('general.category'), array('class' => 'col-md-3 control-label')) }}
<div class="col-md-8 required">
{{ Form::select('category_id', $category_list , Input::old('category_id', $component->category_id), array('class'=>'select2', 'style'=>'width:100%')) }}
{!! $errors->first('category_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
<!-- QTY -->
<div class="form-group {{ $errors->has('total_qty') ? ' has-error' : '' }}">
{{ Form::label('total_qty', trans('general.quantity'), array('class' => 'col-md-3 control-label')) }}
<div class="col-md-2 required">
<input class="form-control" type="text" name="total_qty" id="total_qty" value="{{ Input::old('qty', $component->total_qty) }}" />
</div>
{!! $errors->first('total_qty', ' <div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fa fa-times"></i> :message</span></div>') !!}
</div>
<!-- Min QTY -->
<div class="form-group{{ $errors->has('min_amt') ? ' has-error' : '' }}">
{{ Form::label('min_amt', trans('general.min_amt'), array('class' => 'col-md-3 control-label')) }}
<div class="col-md-2">
<input class="form-control" type="text" name="min_amt" id="min_amt" value="{{ Input::old('qty', $component->min_amt) }}" />
</div>
<div class="col-md-1 text-left">
<a href="#" data-toggle="tooltip" title="{{ trans('general.min_amt_help') }}"><i class="fa fa-info-circle"></i></a>
</div>
<div class="col-md-12">
{!! $errors->first('min_amt', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
<!-- Company -->
@if (\App\Models\Company::isCurrentUserAuthorized())
<div class="form-group {{ $errors->has('company_id') ? ' has-error' : '' }}">
{{ Form::label('company_id', trans('general.company'), array('class' => 'col-md-3 control-label')) }}
<div class="col-md-8">
{{ Form::select('company_id', $company_list , Input::old('company_id', $component->company_id), array('class'=>'select2', 'style'=>'width:350px')) }}
{!! $errors->first('company_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
@endif
<!-- Location -->
<div class="form-group {{ $errors->has('location_id') ? ' has-error' : '' }}">
<div class="col-md-3">
{{ Form::label('location_id', trans('general.location')) }}
</div>
{{ Form::label('location_id', trans('general.location'), array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7 col-sm-12">
{{ Form::select('location_id', $location_list , Input::old('location_id', $component->location_id), array('class'=>'select2', 'style'=>'width:350px')) }}
@ -94,9 +125,9 @@
<!-- Order Number -->
<div class="form-group {{ $errors->has('order_number') ? ' has-error' : '' }}">
<div class="col-md-3">
{{ Form::label('order_number', trans('admin/components/general.order')) }}
</div>
{{ Form::label('order_number', trans('admin/components/general.order'), array('class' => 'col-md-3 control-label')) }}
<div class="col-md-3">
<input class="form-control" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number', $component->order_number) }}" />
{!! $errors->first('order_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
@ -105,9 +136,9 @@
<!-- Purchase Date -->
<div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
<div class="col-md-3">
{{ Form::label('purchase_date', trans('admin/components/general.date')) }}
</div>
{{ Form::label('purchase_date', trans('admin/components/general.date'), array('class' => 'col-md-3 control-label')) }}
<div class="input-group col-md-3">
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $component->purchase_date) }}">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
@ -117,9 +148,9 @@
<!-- Purchase Cost -->
<div class="form-group {{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
<div class="col-md-3">
{{ Form::label('purchase_cost', trans('admin/components/general.cost')) }}
</div>
{{ Form::label('purchase_cost', trans('admin/components/general.cost'), array('class' => 'col-md-3 control-label')) }}
<div class="col-md-2">
<div class="input-group">
<span class="input-group-addon">
@ -131,36 +162,7 @@
</div>
</div>
<!-- QTY -->
<div class="form-group {{ $errors->has('total_qty') ? ' has-error' : '' }}">
<div class="col-md-3">
{{ Form::label('total_qty', trans('general.quantity')) }} *
</div>
<div class="col-md-9" style="margin-left: -15px">
<div class="col-md-2">
<input class="form-control" type="text" name="total_qty" id="total_qty" value="{{ Input::old('qty', $component->total_qty) }}" />
</div>
{!! $errors->first('total_qty', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
<!-- Min QTY -->
<div class="form-group{{ $errors->has('min_amt') ? ' has-error' : '' }}">
<div class="col-md-3">
{{ Form::label('min_amt', trans('general.min_amt')) }}
</div>
<div class="col-md-9" style="margin-left: -15px">
<div class="col-md-2">
<input class="form-control col-md-3" type="text" name="min_amt" id="min_amt" value="{{ Input::old('qty', $component->min_amt) }}" />
</div>
<div class="col-md-7" style="margin-left: -15px;">
<a href="#" data-toggle="tooltip" title="{{ trans('general.min_amt_help') }}"><i class="fa fa-info-circle"></i></a>
</div>
<div class="col-md-12">
{!! $errors->first('min_amt', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
</div>
</div>
<div class="box-footer text-right">

View file

@ -22,7 +22,7 @@
<div class="row">
<div class="col-md-9">
<div class="col-md-8 col-md-offset-2">
<div class="box box-default">
@if ($group->id)
@ -44,13 +44,13 @@
<label for="name" class="col-md-3 control-label">{{ trans('admin/groups/titles.group_name') }}
<i class='fa fa-asterisk'></i></label>
</label>
<div class="col-md-6">
<div class="col-md-6 required">
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $group->name) }}" />
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
<div class="col-md-9 col-md-offset-3">
<div class="col-md-8 col-md-offset-3">
@foreach ($permissions as $area => $permission)

View file

@ -24,7 +24,7 @@
<div class="row">
<div class="col-md-8">
<div class="col-md-8 col-md-offset-2">
<div class="box box-default">
@if ($location->id)
@ -43,7 +43,7 @@
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
<label for="name" class="col-md-3 control-label">{{ trans('admin/locations/table.name') }}
</label>
<div class="col-md-9">
<div class="col-md-8 required">
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $location->name) }}" />
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>

View file

@ -42,7 +42,7 @@
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
<label for="name" class="col-md-3 control-label">{{ trans('admin/manufacturers/table.name') }}
</label>
<div class="col-md-9">
<div class="col-md-9 required">
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $manufacturer->name) }}" />
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>

View file

@ -20,7 +20,7 @@
@section('content')
<div class="row">
<div class="col-md-9">
<div class="col-md-8 col-md-offset-2">
{{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal' ]) }}
<!-- CSRF Token -->
@ -40,10 +40,9 @@
<div class="box-body">
<!-- Model name -->
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
<label for="name" class="col-md-3 control-label">{{ trans('admin/models/table.name') }}
<i class='fa fa-asterisk'></i></label>
<label for="name" class="col-md-3 control-label">{{ trans('admin/models/table.name') }}</label>
</label>
<div class="col-md-7">
<div class="col-md-7 required">
<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="fa fa-times"></i> :message</span>') !!}
</div>
@ -51,9 +50,9 @@
<div class="form-group {{ $errors->has('manufacturer_id') ? ' has-error' : '' }}">
<label for="manufacturer_id" class="col-md-3 control-label">{{ trans('general.manufacturer') }}
<i class='fa fa-asterisk'></i></label>
</label>
</label>
<div class="col-md-7">
<div class="col-md-7 required">
{{ 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"><br><i class="fa fa-times"></i> :message</span>') !!}
</div>
@ -62,9 +61,9 @@
<!-- Category -->
<div class="form-group {{ $errors->has('category_id') ? ' has-error' : '' }}">
<label for="category_id" class="col-md-3 control-label">{{ trans('general.category') }}
<i class='fa fa-asterisk'></i></label>
</label>
</label>
<div class="col-md-7">
<div class="col-md-7 required">
{{ 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"><br><i class="fa fa-times"></i> :message</span>') !!}
</div>

View file

@ -31,15 +31,24 @@
<div class="box-body">
<!-- Asset Title -->
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
<label for="name" class="col-md-3 control-label">{{ trans('general.name') }}
<i class='fa fa-asterisk'></i></label>
<label for="name" class="col-md-3 control-label">{{ trans('general.name') }}</label>
</label>
<div class="col-md-7">
<div class="col-md-7 required">
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $statuslabel->name) }}" />
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
<!-- Label type -->
<div class="form-group {{ $errors->has('statuslabel_types') ? 'has-error' : '' }}">
<label for="statuslabel_types" class="col-md-3 control-label">{{ trans('admin/statuslabels/table.status_type') }}
</label>
</label>
<div class="col-md-7 required">
{{ Form::select('statuslabel_types', $statuslabel_types, $statuslabel->getStatuslabelType(), array('class'=>'select2', 'style'=>'min-width:400px')) }}
{!! $errors->first('statuslabel_types', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
<!-- Note -->
<div class="form-group {{ $errors->has('notes') ? 'has-error' : '' }}">
@ -51,16 +60,7 @@
</div>
<!-- Label type -->
<div class="form-group {{ $errors->has('statuslabel_types') ? 'has-error' : '' }}">
<label for="statuslabel_types" class="col-md-3 control-label">{{ trans('admin/statuslabels/table.status_type') }}
<i class='fa fa-asterisk'></i></label>
</label>
<div class="col-md-7">
{{ Form::select('statuslabel_types', $statuslabel_types, $statuslabel->getStatuslabelType(), array('class'=>'select2', 'style'=>'min-width:400px')) }}
{!! $errors->first('statuslabel_types', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
</div>
<div class="box-footer text-right">
@ -71,7 +71,7 @@
<!-- side address column -->
<div class="col-md-3">
<h6>{{ trans('admin/statuslabels/table.about') }}</h6>
<h4>{{ trans('admin/statuslabels/table.about') }}</h4>
<p>{{ trans('admin/statuslabels/table.info') }}</p>
</div>

View file

@ -20,7 +20,7 @@
@section('content')
<div class="row">
<div class="col-md-9">
<div class="col-md-9 col-md-offset-2">
{{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'autocomplete' => 'off' ]) }}
<!-- CSRF Token -->
@ -41,7 +41,7 @@
<!-- Name -->
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
{{ Form::label('name', trans('admin/suppliers/table.name'), array('class' => 'col-md-3 control-label')) }}
<div class="col-md-6">
<div class="col-md-6 required">
{{ Form::text('name', Input::old('name', $supplier->name), array('class' => 'form-control')) }}
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>