products form htmx attributes wip - bedtime though
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
</aside>
|
</aside>
|
||||||
<div class="column column-80">
|
<div class="column column-80">
|
||||||
<div class="products form content">
|
<div class="products form content">
|
||||||
<?= $this->Form->create($product) ?>
|
<?= $this->Form->create($product, ['id' => 'main-form']) ?>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><?= __('Add Product') ?></legend>
|
<legend><?= __('Add Product') ?></legend>
|
||||||
<?= $this->element('Products/form'); ?>
|
<?= $this->element('Products/form'); ?>
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
<h4 class="mb-4">Basic Info</h4>
|
<h4 class="mb-4">Basic Info</h4>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
echo $this->Form->hidden('form', ['value' => 'product']);
|
|
||||||
echo $this->Form->control('name');
|
echo $this->Form->control('name');
|
||||||
echo $this->Form->control('product_catalog_id', [
|
echo $this->Form->control('product_catalog_id', [
|
||||||
'empty' => 'Select a Catalog',
|
'empty' => 'Select a Catalog',
|
||||||
@@ -31,6 +30,7 @@ echo $this->Form->control('product_category_id', [
|
|||||||
'hx-get' => $this->Url->build([
|
'hx-get' => $this->Url->build([
|
||||||
'controller' => 'ProductCategoryAttributes',
|
'controller' => 'ProductCategoryAttributes',
|
||||||
'action' => 'form',
|
'action' => 'form',
|
||||||
|
'?' => ['form' => 'product'],
|
||||||
0 => $productCategory ? $productCategory->product_catalog_id : '',
|
0 => $productCategory ? $productCategory->product_catalog_id : '',
|
||||||
]),
|
]),
|
||||||
'hx-target' => '#product-attributes-container',
|
'hx-target' => '#product-attributes-container',
|
||||||
|
|||||||
Reference in New Issue
Block a user