From 716c67d4b858f45d0d59a2fde808a9a35f6aff48 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 2 Dec 2024 15:45:07 +0000 Subject: [PATCH] Fixed #15901 - re-added required indicator on text and select custom fields Signed-off-by: snipe --- .../views/models/custom_fields_form.blade.php | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/resources/views/models/custom_fields_form.blade.php b/resources/views/models/custom_fields_form.blade.php index 8d414f337d..87d58874b9 100644 --- a/resources/views/models/custom_fields_form.blade.php +++ b/resources/views/models/custom_fields_form.blade.php @@ -2,20 +2,22 @@ @foreach($model->fieldset->fields AS $field)
-
+
@if ($field->element!='text') - + @if ($field->element=='listbox') + {{ Form::select($field->db_column_name(), $field->formatFieldValuesAsArray(), - old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id))), ['class'=>'format select2 form-control']) }} + old($field->db_column_name(),(isset($item) ? Helper::gracefulDecrypt($field, $item->{$field->db_column_name()}) : $field->defaultValue($model->id))), ['class' => 'format select2 form-control', ($field->pivot->required=='1' ? ' required' : '') ]) }} @elseif ($field->element=='textarea') - + + @elseif ($field->element=='checkbox') - + @foreach ($field->formatFieldValuesAsArray() as $key => $value)