<div class="row mb-3">
    <label class="col-md-3 col-form-label">Name *</label>
    <div class="col-md-7">
        <?= $this->Form->control('name', ['class' => 'form-control', 'label' => false, 'required']); ?>
    </div>
</div>

<div class="row mb-3">
    <label class="col-md-3 col-form-label">Description *</label>
    <div class="col-md-7">
        <?= $this->Form->control('description', ['class' => 'form-control', 'label' => false, 'required']); ?>
    </div>
</div>

<div class="row mb-3">
    <label class="col-md-3 col-form-label">Show on Home</label>
    <div class="col-md-7">
        <?= $this->Form->control('show_on_home', ['class' => 'form-select', 'options' => [1 => 'Yes', 0 => 'No'], 'label' => false]); ?>
    </div>
</div>

<div class="row mb-3">
    <label class="col-md-3 col-form-label">Content</label>
    <div class="col-md-7">
        <?= $this->Form->textarea('content', ['class' => 'form-control ckeditor', 'label' => false]); ?>
    </div>
</div>

<div class="row mb-3">
    <label class="col-md-3 col-form-label">Icon Class</label>
    <div class="col-md-7">
        <?= $this->Form->control('fa_icon', ['class' => 'form-control', 'label' => false]); ?>
    </div>
</div>

<div class="row mb-3">
    <label class="col-md-3 col-form-label">Image</label>
    <div class="col-md-7">
        <?= $this->Form->control('image_path', ['class' => 'form-control', 'label' => false, 'type' => 'file']); ?>
    </div>
</div>

<div class="row mb-3">
    <label class="col-md-3 col-form-label">Image</label>
    <div class="col-md-7">
        <?= $this->Form->hidden('old_image', ['class' => 'form-control', 'label' => false, 'value' => $menu->image_path]); ?>
    </div>
</div>

<?php if (!empty($menu->image_path)) { ?>
    <div class="row mb-3">
        <label class="col-md-3 col-form-label">Old Images</label>
        <div class="col-md-9">
            <div class="row">
                <div class="col-md-3 images_edit" id="image_div<?= $menu->id ?>">
                    <?= $this->Html->image(Cake\Core\Configure::read('IMAGE_PREPATH') . $menu->image_path, ['class' => 'image_edit img-fluid']) ?>
                    <br>
                </div>
            </div>
        </div>
    </div>
<?php } ?>

