mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Fixed #9370 - listbox custom fields not decryoted on edit
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
7da32443ff
commit
390403ddb7
|
@ -774,10 +774,9 @@ class Helper
|
|||
|
||||
|
||||
/**
|
||||
* Gracefully handle decrypting the legacy data (encrypted via mcrypt) and use the new
|
||||
* decryption method instead.
|
||||
* Gracefully handle decrypting encrypted fields (custom fields, etc).
|
||||
*
|
||||
* This is not currently used, but will be.
|
||||
* @todo allow this to handle more than just strings (arrays, etc)
|
||||
*
|
||||
* @author A. Gianotto
|
||||
* @since 3.6
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
@if ($field->element!='text')
|
||||
<!-- Listbox -->
|
||||
@if ($field->element=='listbox')
|
||||
{{ Form::select($field->db_column_name(), $field->formatFieldValuesAsArray(),
|
||||
Request::old($field->db_column_name(),(isset($item) ? $item->{$field->db_column_name()} : $field->defaultValue($model->id))), ['class'=>'format select2 form-control']) }}
|
||||
{{ Form::select($field->db_column_name(), $field->formatFieldValuesAsArray(),
|
||||
Request::old($field->db_column_name(),(isset($item) ? \App\Helpers\Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id))), ['class'=>'format select2 form-control']) }}
|
||||
|
||||
@elseif ($field->element=='textarea')
|
||||
<textarea class="col-md-6 form-control" id="{{ $field->db_column_name() }}" name="{{ $field->db_column_name() }}">{{ Request::old($field->db_column_name(),(isset($item) ? $item->{$field->db_column_name()} : $field->defaultValue($model->id))) }}</textarea>
|
||||
|
|
Loading…
Reference in a new issue