mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Properly select 'CUSTOM REGEX' from the select list if the format declares onee
This commit is contained in:
parent
cfc4229308
commit
8d36971c8b
|
@ -74,8 +74,14 @@
|
|||
<label for="format" class="col-md-4 control-label">
|
||||
{{ trans('admin/custom_fields/general.field_format') }}
|
||||
</label>
|
||||
@php
|
||||
$field_format = '';
|
||||
if (stripos($field->format, 'regex') === 0){
|
||||
$field_format = 'CUSTOM REGEX';
|
||||
}
|
||||
@endphp
|
||||
<div class="col-md-6 required">
|
||||
{{ Form::select("format",Helper::predefined_formats(), $field->format, array('class'=>'format select2 form-control', 'aria-label'=>'format')) }}
|
||||
{{ Form::select("format",Helper::predefined_formats(), ($field_format == '') ? $field->format : $field_format, array('class'=>'format select2 form-control', 'aria-label'=>'format')) }}
|
||||
{!! $errors->first('format', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue