mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Use anoynynous blade component for errors
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
12fa505972
commit
0f4548e112
6
resources/views/blade/form-error.blade.php
Normal file
6
resources/views/blade/form-error.blade.php
Normal file
|
@ -0,0 +1,6 @@
|
|||
@props(['name'])
|
||||
@error($name)
|
||||
<span class="alert-msg">
|
||||
<x-icon type="x"/> {{ $message }}
|
||||
</span>
|
||||
@enderror
|
|
@ -999,14 +999,15 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
|||
$(inputElement).closest('.help-block').remove();
|
||||
},
|
||||
onfocusout: function(element) {
|
||||
$(element).closest().removeClass('has-error');
|
||||
return $(element).valid();
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
|
||||
$.extend($.validator.messages, {
|
||||
required: "{{ trans('validation.generic.required') }}",
|
||||
email: "{{ trans('validation.generic.email') }}"
|
||||
required: '<x-icon type="x"/> {{ trans('validation.generic.required') }}',
|
||||
email: '<x-icon type="x"/> {{ trans('validation.generic.email') }}'
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
@endif
|
||||
</select>
|
||||
</div>
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fas fa-times"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{{ Form::label('address', trans('general.address'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7">
|
||||
{{Form::text('address', old('address', $item->address), array('class' => 'form-control', 'aria-label'=>'address', 'maxlength'=>'191')) }}
|
||||
{!! $errors->first('address', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="address" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
|||
<label class="sr-only " for="address2">{{ trans('general.address') }}</label>
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
{{Form::text('address2', old('address2', $item->address2), array('class' => 'form-control', 'aria-label'=>'address2', 'maxlength'=>'191')) }}
|
||||
{!! $errors->first('address2', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="address2" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
{{ Form::label('city', trans('general.city'), array('class' => 'col-md-3 control-label', 'maxlength'=>'191')) }}
|
||||
<div class="col-md-7">
|
||||
{{Form::text('city', old('city', $item->city), array('class' => 'form-control', 'aria-label'=>'city')) }}
|
||||
{!! $errors->first('city', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="city" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
{{ Form::label('state', trans('general.state'), array('class' => 'col-md-3 control-label', 'maxlength'=>'191')) }}
|
||||
<div class="col-md-7">
|
||||
{{Form::text('state', old('state', $item->state), array('class' => 'form-control', 'aria-label'=>'state')) }}
|
||||
{!! $errors->first('state', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="state" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -36,7 +36,7 @@
|
|||
<div class="col-md-7">
|
||||
{!! Form::countries('country', old('country', $item->country), 'select2') !!}
|
||||
<p class="help-block">{{ trans('general.countries_manually_entered_help') }}</p>
|
||||
{!! $errors->first('country', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="country" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -44,6 +44,6 @@
|
|||
{{ Form::label('zip', trans('general.zip'), array('class' => 'col-md-3 control-label', 'maxlength'=>'10')) }}
|
||||
<div class="col-md-7">
|
||||
{{Form::text('zip', old('zip', $item->zip), array('class' => 'form-control')) }}
|
||||
{!! $errors->first('zip', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="zip" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -15,6 +15,6 @@
|
|||
@endif
|
||||
</select>
|
||||
</div>
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
</div>
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
</div>
|
||||
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
|
||||
{!! $errors->first('category_type', '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
<x-form-error name="category_type" />
|
||||
</div>
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<label for="category_id" class="col-md-3 control-label">{{ trans('general.category') }}</label>
|
||||
<div class="col-md-7 col-sm-12{{ (Helper::checkIfRequired($item, 'category_id')) ? ' required' : '' }}">
|
||||
{{ Form::select('category_id', $category_list , old('category_id', $item->category_id), array('class'=>'select2', 'style'=>'width:100%')) }}
|
||||
{!! $errors->first('category_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="category_id" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
@endif
|
||||
</select>
|
||||
</div>
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
@if (\App\Models\Company::isCurrentUserAuthorized())
|
||||
<div class="form-group {{ $errors->has('company_id') ? ' has-error' : '' }}">
|
||||
<div class="col-md-3 control-label">
|
||||
{{ Form::label('company_id', trans('general.company'), array('class' => 'col-md-3 control-label', 'for' => 'company_id')) }}
|
||||
<x-form-error name="company_id" />
|
||||
</div>
|
||||
<div class="col-md-7 col-sm-12{{ (Helper::checkIfRequired($item, 'company_id')) ? ' required' : '' }}">
|
||||
{{ Form::select('company_id', $company_list , old('company_id', $item->company_id), array('class'=>'select2', 'style'=>'width:100%')) }}
|
||||
{!! $errors->first('company_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="company_id" />
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
|
|
@ -15,6 +15,6 @@
|
|||
@endif
|
||||
</select>
|
||||
</div>
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fas fa-times"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
</div>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="{{ $fieldname }}" id="{{ $fieldname }}" value="{{ old($fieldname, ($item->{$fieldname}) ? date('Y-m-d', strtotime($item->{$fieldname})) : '') }}" readonly style="background-color:inherit" maxlength="10">
|
||||
<span class="input-group-addon"><x-icon type="calendar" /></span>
|
||||
</div>
|
||||
{!! $errors->first($fieldname, '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
@endif
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
</div>
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<label for="depreciation_id" class="col-md-3 control-label">{{ trans('general.depreciation') }}</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('depreciation_id', $depreciation_list , old('depreciation_id', $item->depreciation_id), array('class'=>'select2', 'style'=>'width:350px', 'aria-label'=>'depreciation_id')) }}
|
||||
{!! $errors->first('depreciation_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="depreciation_id" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="form-group {{ $errors->has('email') ? ' has-error' : '' }}">
|
||||
{{ Form::label('email', trans('admin/suppliers/table.email'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7">
|
||||
{{Form::text('email', old('email', $item->email), array('class' => 'form-control')) }}
|
||||
{!! $errors->first('email', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
{{ Form::text('email', old('email', $item->email), array('class' => 'form-control', 'type' => 'email')) }}
|
||||
<x-form-error name="email" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="asset_eol_date" id="asset_eol_date" readonly value="{{ old('asset_eol_date', optional($item->asset_eol_date)->format('Y-m-d') ?? $item->asset_eol_date ?? '') }}" style="background-color:inherit" />
|
||||
<span class="input-group-addon"><x-icon type="calendar" /></span>
|
||||
</div>
|
||||
{!! $errors->first('asset_eol_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="asset_eol_date" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
{{ Form::label('fax', trans('admin/suppliers/table.fax'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7">
|
||||
{{Form::text('fax', old('fax', $item->fax), array('class' => 'form-control')) }}
|
||||
{!! $errors->first('fax', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="fax" />
|
||||
</div>
|
||||
</div>
|
|
@ -13,7 +13,7 @@
|
|||
<div class="form-group">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<img src="{{ Storage::disk('public')->url($image_path.e($item->{($fieldname ?? 'image')})) }}" class="img-responsive">
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
<x-form-error name="image_delete" />
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
@ -34,9 +34,8 @@
|
|||
|
||||
<p class="help-block" id="uploadFile-status">{{ trans('general.image_filetypes_help', ['size' => Helper::file_upload_max_size_readable()]) }} {{ $help_text ?? '' }}</p>
|
||||
|
||||
<x-form-error name="image" />
|
||||
|
||||
|
||||
{!! $errors->first('image', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-4 col-md-offset-3" aria-hidden="true">
|
||||
<img id="uploadFile-imagePreview" style="max-width: 300px; display: none;" alt="{{ trans('general.alt_uploaded_image_thumbnail') }}">
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<label for="item_no" class="col-md-3 control-label">{{ trans('admin/consumables/general.item_no') }}</label>
|
||||
<div class="col-md-7 col-sm-12{{ (Helper::checkIfRequired($item, 'item_no')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="item_no" id="item_no" value="{{ old('item_no', $item->item_no) }}" />
|
||||
{!! $errors->first('item_no', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="item_no" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -22,6 +22,6 @@
|
|||
@endcan
|
||||
</div>
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fas fa-times"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
</div>
|
||||
|
|
|
@ -15,6 +15,6 @@
|
|||
@endif
|
||||
</select>
|
||||
</div>
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg"><i class="fas fa-times"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
</div>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</select>
|
||||
</div>
|
||||
|
||||
{!! $errors->first('location_id', '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name="location_id" />
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
@endcan
|
||||
</div>
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
@if (isset($help_text))
|
||||
<div class="col-md-7 col-sm-11 col-md-offset-3">
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<label for="location_id" class="col-md-3 control-label">{{ trans('general.location') }}</label>
|
||||
<div class="col-md-7 col-sm-12{{ (Helper::checkIfRequired($item, 'location_id')) ? ' required' : '' }}">
|
||||
{{ Form::select('location_id', $location_list , old('location_id', $item->location_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('location_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="location_id" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
</label>
|
||||
<div class="col-md-7{{ (Helper::checkIfRequired($item, 'asset_maintenance_type')) ? ' required' : '' }}">
|
||||
{{ Form::select('asset_maintenance_type', $assetMaintenanceType , old('asset_maintenance_type', $item->asset_maintenance_type), ['class'=>'select2', 'style'=>'min-width:350px', 'aria-label'=>'asset_maintenance_type']) }}
|
||||
{!! $errors->first('asset_maintenance_type', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="asset_maintenance_type" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -23,7 +23,5 @@
|
|||
@endif
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
</div>
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<label for="manufacturer_id" class="col-md-3 control-label">{{ trans('general.manufacturer') }}</label>
|
||||
<div class="col-md-7{{ (Helper::checkIfRequired($item, 'manufacturer_id')) ? ' required' : '' }}">
|
||||
{{ Form::select('manufacturer_id', $manufacturer_list , old('manufacturer_id', $item->manufacturer_id), array('class'=>'select2', 'style'=>'width:100%')) }}
|
||||
{!! $errors->first('manufacturer_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="manufacturer_id" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</a>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
{!! $errors->first('min_amt', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="min_amt" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -24,5 +24,5 @@
|
|||
@endcan
|
||||
</div>
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
</div>
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<label for="model_number" class="col-md-3 control-label">{{ trans('general.model_no') }}</label>
|
||||
<div class="col-md-7">
|
||||
<input class="form-control" type="text" name="model_number" aria-label="model_number" id="model_number" value="{{ old('model_number', $item->model_number) }}" />
|
||||
{!! $errors->first('model_number', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="model_number" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<label for="name" class="col-md-3 control-label">{{ $translated_name }}</label>
|
||||
<div class="col-md-7 col-sm-12{{ (Helper::checkIfRequired($item, 'name')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="name" aria-label="name" id="name" value="{{ old('name', $item->name) }}"{!! (Helper::checkIfRequired($item, 'name')) ? ' required' : '' !!} />
|
||||
{!! $errors->first('name', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<input class="form-control" type="text" name="name" aria-label="name" id="name" value="{{ old('name', $item->name) }}"{!! (Helper::checkIfRequired($item, 'name')) ? ' required' : '' !!}/>
|
||||
<x-form-error name="name" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<label for="notes" class="col-md-3 control-label">{{ trans('admin/hardware/form.notes') }}</label>
|
||||
<div class="col-md-7 col-sm-12">
|
||||
<textarea class="col-md-6 form-control" id="notes" aria-label="notes" name="notes" style="min-width:100%;">{{ old('notes', $item->notes) }}</textarea>
|
||||
{!! $errors->first('notes', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="notes" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<label for="order_number" class="col-md-3 control-label">{{ trans('general.order_number') }}</label>
|
||||
<div class="col-md-7 col-sm-12">
|
||||
<input class="form-control" type="text" name="order_number" aria-label="order_number" id="order_number" value="{{ old('order_number', $item->order_number) }}" />
|
||||
{!! $errors->first('order_number', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="order_number" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
{{ Form::label('phone', trans('admin/suppliers/table.phone'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7">
|
||||
{{Form::text('phone', old('phone', $item->phone), array('class' => 'form-control', 'aria-label'=>'phone')) }}
|
||||
{!! $errors->first('phone', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="phone" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</span>
|
||||
</div>
|
||||
<div class="col-md-9" style="padding-left: 0px;">
|
||||
{!! $errors->first('purchase_cost', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="purchase_cost" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
<input type="text" class="form-control" placeholder="{{ trans('general.select_date') }}" name="purchase_date" id="purchase_date" readonly value="{{ old('purchase_date', ($item->purchase_date) ? $item->purchase_date->format('Y-m-d') : '') }}" style="background-color:inherit">
|
||||
<span class="input-group-addon"><x-icon type="calendar" /></span>
|
||||
</div>
|
||||
{!! $errors->first('purchase_date', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="purchase_date" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<input class="form-control" maxlength="5" type="text" name="qty" aria-label="qty" id="qty" value="{{ old('qty', $item->qty) }}" {!! (Helper::checkIfRequired($item, 'qty')) ? ' required ' : '' !!}/>
|
||||
</div>
|
||||
<div class="col-md-12" style="padding-left:0px">
|
||||
{!! $errors->first('qty', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="qty" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<label for="{{ $fieldname }}" class="col-md-3 control-label">{{ trans('admin/hardware/form.serial') }} </label>
|
||||
<div class="col-md-7 col-sm-12{{ (Helper::checkIfRequired($item, 'serial')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="{{ $fieldname }}" id="{{ $fieldname }}" value="{{ old((isset($old_val_name) ? $old_val_name : $fieldname), $item->serial) }}" />
|
||||
{!! $errors->first('serial', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="serial" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -22,6 +22,5 @@
|
|||
@endcan
|
||||
</div>
|
||||
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<label for="status_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.status') }}</label>
|
||||
<div class="col-md-7 col-sm-11{{ (Helper::checkIfRequired($item, 'status_id')) ? ' required' : '' }}">
|
||||
{{ Form::select('status_id', $statuslabel_list , old('status_id', $item->status_id), array('class'=>'select2 status_id', 'style'=>'width:100%','id'=>'status_select_id', 'aria-label'=>'status_id', 'required' => 'required')) }}
|
||||
{!! $errors->first('status_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="status_id" />
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2 text-left">
|
||||
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
@endcan
|
||||
</div>
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />) !!}
|
||||
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<label for="supplier_id" class="col-md-3 control-label">{{ trans('general.supplier') }}</label>
|
||||
<div class="col-md-7{{ (Helper::checkIfRequired($item, 'supplier_id')) ? ' required' : '' }}">
|
||||
{{ Form::select('supplier_id', $supplier_list , old('supplier_id', $item->supplier_id), ['class'=>'select2', 'style'=>'min-width:350px', 'id' => 'supplier_select_id']) }}
|
||||
{!! $errors->first('supplier_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="supplier_id" />
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left">
|
||||
<a href='{{ route('modal.show', 'supplier') }}' data-toggle="modal" data-target="#createModal" data-dependency="supplier" data-select='supplier_select_id' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
|
||||
<span class='label label-default' id="{{ $logoId }}-info"></span>
|
||||
|
||||
{!! $errors->first($logoVariable, '<span class="alert-msg">:message</span>') !!}
|
||||
|
||||
<x-form-error name=":$logoVariable" />
|
||||
|
||||
<p class="help-block" style="!important" id="{{ $logoId }}-status">
|
||||
{{ $helpBlock }}
|
||||
|
|
|
@ -22,6 +22,6 @@
|
|||
@endcan
|
||||
</div>
|
||||
|
||||
{!! $errors->first($fieldname, '<div class="col-md-8 col-md-offset-3"><span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span></div>') !!}
|
||||
<x-form-error name=":$fieldname" />
|
||||
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<span class="input-group-addon">{{ trans('admin/hardware/form.months') }}</span>
|
||||
</div>
|
||||
<div class="col-md-9" style="padding-left: 0px;">
|
||||
{!! $errors->first('warranty_months', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<x-form-error name="warranty_months" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<form class="form-horizontal" method="post" autocomplete="off"
|
||||
<form class="form-horizontal" method="post" autocomplete="off" id="create-form"
|
||||
action="{{ (isset($user->id)) ? route('users.update', ['user' => $user->id]) : route('users.store') }}"
|
||||
enctype="multipart/form-data" id="userForm">
|
||||
{{csrf_field()}}
|
||||
|
@ -89,8 +89,8 @@
|
|||
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="first_name">{{ trans('general.first_name') }}</label>
|
||||
<div class="col-md-6{{ (Helper::checkIfRequired($user, 'first_name')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="first_name" id="first_name" value="{{ old('first_name', $user->first_name) }}" maxlength="191" />
|
||||
{!! $errors->first('first_name', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<input class="form-control" type="text" name="first_name" id="first_name" value="{{ old('first_name', $user->first_name) }}" maxlength="191" required="required" />
|
||||
<x-form-error name="first_name" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -99,7 +99,7 @@
|
|||
<label class="col-md-3 control-label" for="last_name">{{ trans('general.last_name') }} </label>
|
||||
<div class="col-md-6{{ (Helper::checkIfRequired($user, 'last_name')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="last_name" id="last_name" value="{{ old('last_name', $user->last_name) }}" maxlength="191" />
|
||||
{!! $errors->first('last_name', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<x-form-error name="last_name" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -117,6 +117,7 @@
|
|||
value="{{ old('username', $user->username) }}"
|
||||
autocomplete="off"
|
||||
maxlength="191"
|
||||
{{ (Helper::checkIfRequired($user, 'username')) ? ' required="required"' : '' }}
|
||||
readonly
|
||||
onfocus="this.removeAttribute('readonly');"
|
||||
{{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}
|
||||
|
@ -137,11 +138,7 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
@if ($errors->first('username'))
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
{!! $errors->first('username', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
@endif
|
||||
<x-form-error name="username" />
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -167,7 +164,7 @@
|
|||
{{ trans('general.managed_ldap') }}
|
||||
@endif
|
||||
<span id="generated-password"></span>
|
||||
{!! $errors->first('password', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<x-form-error name="password" />
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
@if ($user->ldap_import!='1')
|
||||
|
@ -200,7 +197,7 @@
|
|||
@if (config('app.lock_passwords') && ($user->id))
|
||||
<p class="help-block">{{ trans('admin/users/table.lock_passwords') }}</p>
|
||||
@endif
|
||||
{!! $errors->first('password_confirmation', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<x-form-error name="password_confirmation" />
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
@ -244,7 +241,7 @@
|
|||
<div class="col-md-6{{ (Helper::checkIfRequired($user, 'email')) ? ' required' : '' }}">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
type="email"
|
||||
name="email"
|
||||
id="email"
|
||||
maxlength="191"
|
||||
|
@ -254,9 +251,9 @@
|
|||
readonly
|
||||
onfocus="this.removeAttribute('readonly');">
|
||||
@if (config('app.lock_passwords') && ($user->id))
|
||||
<p class="help-block">{{ trans('admin/users/table.lock_passwords') }}</p>
|
||||
<p class="help-block">{{ trans('admin/users/table.lock_passwords') }}</p>
|
||||
@endif
|
||||
{!! $errors->first('email', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
<x-form-error name="email" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue