products form wip
This commit is contained in:
@@ -12,8 +12,9 @@
|
||||
<?php
|
||||
echo $this->Form->control('name');
|
||||
echo $this->Form->control('product_catalog_id', [
|
||||
'empty' => 'Select a Catalog',
|
||||
'options' => $productCatalogs,
|
||||
'hx-trigger' => 'change, load delay:1s',
|
||||
'hx-trigger' => 'change, load delay:500ms',
|
||||
'hx-get' => $this->Url->build([
|
||||
'controller' => 'ProductCategories',
|
||||
'action' => 'select',
|
||||
@@ -22,9 +23,16 @@ echo $this->Form->control('product_catalog_id', [
|
||||
'hx-target' => '#product_category_id',
|
||||
]);
|
||||
echo $this->Form->control('product_category_id', [
|
||||
'options' => $productCategories ?? [],
|
||||
'options' => [],
|
||||
'empty' => true,
|
||||
'id' => 'product_category_id',
|
||||
'hx-trigger' => 'change, load delay:1s',
|
||||
'hx-get' => $this->Url->build([
|
||||
'controller' => 'ProductCategoryAttributes',
|
||||
'action' => 'form',
|
||||
0 => $productCategory ? $productCategory->product_catalog_id : '',
|
||||
]),
|
||||
'hx-target' => '#product-attributes-container',
|
||||
]);
|
||||
echo $this->Form->control('product_type_id');
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user