mirror of
https://github.com/Karaka-Management/oms-Attribute.git
synced 2026-01-11 00:28:40 +00:00
continue implementations
This commit is contained in:
parent
b66a28e782
commit
8fae14a103
|
|
@ -35,6 +35,11 @@
|
|||
"type": "TINYINT(1)",
|
||||
"null": false
|
||||
},
|
||||
"attribute_attr_type_repeatable": {
|
||||
"name": "attribute_attr_type_repeatable",
|
||||
"type": "TINYINT(1)",
|
||||
"null": false
|
||||
},
|
||||
"attribute_attr_type_required": {
|
||||
"description": "Every element must have this attribute type if set to true.",
|
||||
"name": "attribute_attr_type_required",
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ trait ApiAttributeTraitController
|
|||
$attrType = new AttributeType($request->getDataString('name') ?? '');
|
||||
$attrType->datatype = $request->getDataInt('datatype') ?? 0;
|
||||
$attrType->custom = $request->getDataBool('custom') ?? false;
|
||||
$attrType->repeatable = $request->getDataBool('repeatable') ?? false;
|
||||
$attrType->isRequired = $request->getDataBool('is_required') ?? false;
|
||||
$attrType->validationPattern = $request->getDataString('validation_pattern') ?? '';
|
||||
$attrType->setL11n($request->getDataString('title') ?? '', $request->getDataString('language') ?? ISO639x1Enum::_EN);
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ class AttributeType implements \JsonSerializable
|
|||
|
||||
public bool $isRequired = false;
|
||||
|
||||
public bool $repeatable = false;
|
||||
|
||||
/**
|
||||
* Datatype of the attribute
|
||||
*
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ final class AttributeValueMapper extends DataMapperFactory
|
|||
'mapper' => AttributeValueL11nMapper::class,
|
||||
'table' => 'attribute_attr_value_l11n',
|
||||
'self' => 'attribute_attr_value_l11n_value',
|
||||
'column' => 'content',
|
||||
'external' => null,
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -13,16 +13,12 @@
|
|||
declare(strict_types=1);
|
||||
|
||||
use phpOMS\Localization\ISO639Enum;
|
||||
use phpOMS\Localization\NullLocalization;
|
||||
use phpOMS\Uri\UriFactory;
|
||||
|
||||
$attribute = $this->attributes;
|
||||
$languages = ISO639Enum::getConstants();
|
||||
$types = $this->attributeTypes;
|
||||
$units = $this->units;
|
||||
|
||||
/** @var \phpOMS\Localization\Localization $l11n */
|
||||
$l11n = $this->data['defaultlocalization'] ?? new NullLocalization();
|
||||
?>
|
||||
|
||||
<div class="col-xs-12 col-md-6">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user