view category, attribute options table
This commit is contained in:
@@ -65,7 +65,7 @@ class ProductCategoryAttributeOptionsTable extends Table
|
||||
public function validationDefault(Validator $validator): Validator
|
||||
{
|
||||
$validator
|
||||
->integer('product_category_attribute_id')
|
||||
->uuid('product_category_attribute_id')
|
||||
->notEmptyString('product_category_attribute_id');
|
||||
|
||||
$validator
|
||||
@@ -96,7 +96,7 @@ class ProductCategoryAttributeOptionsTable extends Table
|
||||
*/
|
||||
public function buildRules(RulesChecker $rules): RulesChecker
|
||||
{
|
||||
$rules->add($rules->existsIn(['product_category_attribute_id'], 'ProductCategoryAttributes'), ['errorField' => '0']);
|
||||
$rules->add($rules->existsIn(['product_category_attribute_id'], 'ProductCategoryAttributes'), ['errorField' => 'product_category_attribute_id']);
|
||||
|
||||
return $rules;
|
||||
}
|
||||
|
||||
@@ -75,16 +75,12 @@
|
||||
<table>
|
||||
<tr>
|
||||
<th><?= __('Name') ?></th>
|
||||
<th><?= __('Options') ?></th>
|
||||
<th><?= __('Enabled') ?></th>
|
||||
<th class="actions"><?= __('Actions') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($productCategory->product_category_attributes as $productCategoryAttribute) : ?>
|
||||
<tr>
|
||||
<td><?= h($productCategoryAttribute->name) ?></td>
|
||||
<td>
|
||||
options
|
||||
</td>
|
||||
<td><?= h($productCategoryAttribute->enabled) ?></td>
|
||||
<td class="actions">
|
||||
<?= $this->Html->link(__('View'), ['controller' => 'ProductCategoryAttributes', 'action' => 'view', $productCategoryAttribute->id]) ?>
|
||||
|
||||
Reference in New Issue
Block a user