@if($module->module_type === \App\Models\Module::TYPE_HOMEPAGE) {{ Form::hidden("module[{$module->module}][module]", $module->module) }} {{ Form::row_text_inline("module[{$module->module}][name]", 'Name', $module->name, 3, 9, \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }} {{ Form::row_textarea_inline("module[{$module->module}][design_notes]", 'Design Notes', $module->design_notes, 3, 9, \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }}
{{ Form::hidden("module[{$module->module}][primary_nav]", 0) }} {{ Form::hidden("module[{$module->module}][secondary_nav]", 0) }} {{ Form::checkbox_ex("module[{$module->module}][primary_nav]", $module->primary_nav, 'Primary Nav') }} {{ Form::checkbox_ex("module[{$module->module}][secondary_nav]", $module->secondary_nav, 'Footer Nav') }}
{{ Form::separator_row('grey-divider thin-divider') }}
{{ Form::button_safe_save("Save", "save_module_with_elements({$module->module})", 'save-btn-'.$module->module) }} {{ Form::hidden("module[{$module->module}][parking_lot]", 0) }} @if(isset($cancel) && $cancel) {{ Form::button_ex('Cancel', "uncollapse({$module->module})") }} @if(!$module->has_children()) {{ Form::checkbox_ex("module[{$module->module}][parking_lot]", $module->parking_lot, 'Move to Parking Lot', null, 'parking_lot_checkbox') }} {{--TODO Switch to bt Form Component--}} {{ Form::text("module[{$module->module}][parking_lot_notes]", $module->parking_lot_notes, ['class' => 'parking-lot-notes', 'placeholder' => 'Notes']) }} @endif @endif
@elseif($module->module_type === \App\Models\Module::TYPE_PAGE) {{ Form::hidden("module[{$module->module}][module]", $module->module) }} {{ Form::row_text_inline("module[{$module->module}][name]", 'Name', $module->name, 3, 9, \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }} {{ Form::row_textarea_inline("module[{$module->module}][description]", 'Description', $module->description, 3, 9, \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }} {{ Form::row_textarea_inline("module[{$module->module}][design_notes]", 'Design Notes', $module->design_notes, 3, 9, \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }}
{{ Form::hidden("module[{$module->module}][primary_nav]", 0) }} {{ Form::hidden("module[{$module->module}][secondary_nav]", 0) }} {{ Form::checkbox_ex("module[{$module->module}][primary_nav]", $module->primary_nav, 'Primary Nav') }} {{ Form::checkbox_ex("module[{$module->module}][secondary_nav]", $module->secondary_nav, 'Footer Nav') }}
{{ Form::label_ex('MODULE ELEMENTS', \App\Helpers\FormComponentHelper::SIZE_SMALL) }} {{ Form::label_ex('Add an Element', \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }} {{--TODO Switch to bt Form Component--}} {{ Form::select('element_type', \App\Models\Module_Element::$element_type_map, null, ['id' => 'element_add', 'placeholder' => 'Select', 'class' => 'add-element-interface']) }} {{ Form::button_ex('ADD', "add_element(false, {$module->module})") }}
@foreach($unlinked_module_elements as $module_element) @php $element_type = $module_element['element_type']; @endphp @include(\App\Models\Module_Element::$element_type_edit_map[$module_element['element_type']], compact('module_element', 'element_type')) @endforeach
{{ Form::separator_row('grey-divider thin-divider') }}
{{ Form::button_safe_save("Save", "save_module_with_elements({$module->module})", 'save-btn-'.$module->module) }} {{ Form::button_ex('Delete', null, 'delete-module-' . $module->module, 'delete-module') }} {{ Form::hidden("module[{$module->module}][parking_lot]", 0) }} @if(isset($cancel) && $cancel) {{ Form::button_ex('Cancel', "uncollapse({$module->module})") }} {{ Form::checkbox_ex("module[{$module->module}][parking_lot]", $module->parking_lot, 'Move to Parking Lot', null, 'parking_lot_checkbox') }} {{--TODO Switch to bt Form Component--}} {{ Form::text("module[{$module->module}][parking_lot_notes]", $module->parking_lot_notes, ['class' => 'parking-lot-notes', 'placeholder' => 'Notes']) }} @endif
@elseif($module->module_type === \App\Models\Module::TYPE_SECTION) {{ Form::hidden("module[{$module->module}][module]", $module->module) }} {{ Form::row_text_inline("module[{$module->module}][name]", 'Name', $module->name, 3, 9, \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }} {{ Form::row_textarea_inline("module[{$module->module}][description]", 'Description', $module->description, 3, 9, \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }} {{ Form::row_textarea_inline("module[{$module->module}][design_notes]", 'Design Notes', $module->design_notes, 3, 9, \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }}
{{ Form::label_ex('MODULE ELEMENTS', \App\Helpers\FormComponentHelper::SIZE_SMALL) }} {{ Form::label_ex('Add an Element', \App\Helpers\FormComponentHelper::SIZE_MEDIUM) }} {{--TODO Switch to bt Form Component--}} {{ Form::select('element_type', \App\Models\Module_Element::$element_type_map, null, ['id' => 'element_add', 'placeholder' => 'Select', 'class' => 'add-element-interface']) }} {{ Form::button_ex('ADD', "add_element(false, {$module->module})") }}
@foreach($unlinked_module_elements as $module_element) @php $element_type = $module_element['element_type']; @endphp @include(\App\Models\Module_Element::$element_type_edit_map[$module_element['element_type']], compact('module_element', 'element_type')) @endforeach
{{ Form::separator_row('grey-divider thin-divider') }}
{{ Form::button_safe_save("Save", "save_module_with_elements({$module->module})", 'save-btn-'.$module->module) }} {{ Form::button_ex('Delete', null, 'delete-module-' . $module->module, 'delete-module') }} {{ Form::hidden("module[{$module->module}][parking_lot]", 0) }} @if(isset($cancel) && $cancel) {{ Form::button_ex('Cancel', "uncollapse({$module->module})") }} {{ Form::checkbox_ex("module[{$module->module}][parking_lot]", $module->parking_lot, 'Move to Parking Lot', null, 'parking_lot_checkbox') }} {{--TODO Switch to bt Form Component--}} {{ Form::text("module[{$module->module}][parking_lot_notes]", $module->parking_lot_notes, ['class' => 'parking-lot-notes', 'placeholder' => 'Notes']) }} @endif
@endif