mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -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
|
* Gracefully handle decrypting encrypted fields (custom fields, etc).
|
||||||
* decryption method instead.
|
|
||||||
*
|
*
|
||||||
* This is not currently used, but will be.
|
* @todo allow this to handle more than just strings (arrays, etc)
|
||||||
*
|
*
|
||||||
* @author A. Gianotto
|
* @author A. Gianotto
|
||||||
* @since 3.6
|
* @since 3.6
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
@if ($field->element!='text')
|
@if ($field->element!='text')
|
||||||
<!-- Listbox -->
|
<!-- Listbox -->
|
||||||
@if ($field->element=='listbox')
|
@if ($field->element=='listbox')
|
||||||
{{ Form::select($field->db_column_name(), $field->formatFieldValuesAsArray(),
|
{{ 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']) }}
|
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')
|
@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>
|
<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