@php $inputList = []; $inputList['id'] = [ 'type' => 'hidden', 'namespace' => 'hidden_id' ]; foreach ($itemInputs as $name => $inpCfg) { $a = $inpCfg; $a['id'] = 'style-template-item-input-' . $name . '-' . $templateItem->template_item_config_id; $inputList[$name] = $a; } @endphp
@php $tiData = $templateItem->toFormData(); $inputList['tags']['data'] = get_input_tag_data('PS-TEMP-ITEM', $templateItem->id, ['id' => $tiData['tags']]); $inputList['id'] = [ 'type' => 'hidden', 'namespace' => 'hidden_id', 'value' => $templateItem->id ]; @endphp @include($_base.'forms.form', [ 'inputs' => $inputList, 'data' => $tiData, 'config' => [ 'button_block_type' => 2, 'save_button_text' => 'Cập nhật', 'cancel_button_text' => "Xóa", 'cancel_button_class' => "danger btn-delete-template-item", 'form_group_options' => [ 'group_class' => '', 'label_class' => '', 'wrapper_class' => '' ], ], 'attrs' => [ 'method' => 'post', 'action' => route('admin.style-sets.personal.templates.update-item'), 'id' => 'template-item-update-form-' .$templateItem->template_item_config_id . '-'. $templateItem->id, 'class' => 'template-item-update-form', 'data-item-id' => $templateItem->id, 'data-config-id' => $templateItem->template_item_config_id, ] ])