mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Use datepicker if custom field format is a date
This commit is contained in:
parent
2dbd1089f5
commit
33a0c2087a
|
@ -27,11 +27,21 @@
|
||||||
@else
|
@else
|
||||||
<!-- Text field -->
|
<!-- Text field -->
|
||||||
|
|
||||||
@if (($field->field_encrypted=='0') || (Gate::allows('admin')))
|
@if ($field->format=='DATE')
|
||||||
<input type="text" value="{{ Input::old($field->db_column_name(),(isset($asset) ? \App\Helpers\Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) : "")) }}" id="{{ $field->db_column_name() }}" class="form-control" name="{{ $field->db_column_name() }}" placeholder="Enter {{ strtolower($field->format) }} text">
|
<!-- Purchase Date -->
|
||||||
|
|
||||||
|
<div class="input-group col-md-4" style="padding-left: 0px;">
|
||||||
|
<input type="text" value="{{ Input::old($field->db_column_name(),(isset($asset) ? \App\Helpers\Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) : "")) }}" id="{{ $field->db_column_name() }}" class="datepicker form-control col-md-4" name="{{ $field->db_column_name() }}" data-date-format="yyyy-mm-dd" placeholder="yyyy-mm-dd">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
@else
|
@else
|
||||||
<input type="text" value="{{ strtoupper(trans('admin/custom_fields/general.encrypted')) }}" class="form-control disabled" disabled>
|
|
||||||
@endif
|
@if (($field->field_encrypted=='0') || (Gate::allows('admin')))
|
||||||
|
<input type="text" value="{{ Input::old($field->db_column_name(),(isset($asset) ? \App\Helpers\Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) : "")) }}" id="{{ $field->db_column_name() }}" class="form-control" name="{{ $field->db_column_name() }}" placeholder="Enter {{ strtolower($field->format) }} text">
|
||||||
|
@else
|
||||||
|
<input type="text" value="{{ strtoupper(trans('admin/custom_fields/general.encrypted')) }}" class="form-control disabled" disabled>
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue