diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index adb8716..75cb759 100755 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -9,5 +9,5 @@ jobs: - uses: actions/first-interaction@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: 'Thank you for createing this issue. We will check it as soon as possible.' + issue-message: 'Thank you for creating this issue. We will check it as soon as possible.' pr-message: 'Thank you for your pull request. We will check it as soon as possible.' diff --git a/Controller/ApiAttributeTraitController.php b/Controller/ApiAttributeTraitController.php index 00190a6..86312dc 100644 --- a/Controller/ApiAttributeTraitController.php +++ b/Controller/ApiAttributeTraitController.php @@ -43,7 +43,7 @@ trait ApiAttributeTraitController * * @since 1.0.0 */ - private function createAttributeFromRequest(RequestAbstract $request, AttributeType $type) : Attribute + public function createAttributeFromRequest(RequestAbstract $request, AttributeType $type) : Attribute { $new = new Attribute(); $new->ref = (int) $request->getData('ref'); @@ -153,7 +153,7 @@ trait ApiAttributeTraitController $attrType = new AttributeType($request->getDataString('name') ?? ''); $attrType->datatype = AttributeValueType::tryFromValue($request->getDataInt('datatype')) ?? AttributeValueType::_STRING; $attrType->custom = $request->getDataBool('custom') ?? false; - $attrType->repeatable = $request->getDataBool('repeatable') ?? false; + $attrType->isRepeatable = $request->getDataBool('is_repeatable') ?? false; $attrType->isInternal = $request->getDataBool('internal') ?? false; $attrType->isRequired = $request->getDataBool('is_required') ?? false; $attrType->validationPattern = $request->getDataString('validation_pattern') ?? ''; diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 364e68b..084eace 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -80,7 +80,7 @@ final class ApiController extends Controller * * @since 1.0.0 */ - private function createAttributeFromRequest(RequestAbstract $request, AttributeType $type) : Attribute + public function createAttributeFromRequest(RequestAbstract $request, AttributeType $type) : Attribute { $new = new Attribute(); $new->ref = (int) $request->getData('ref'); @@ -246,6 +246,7 @@ final class ApiController extends Controller $attrType->datatype = AttributeValueType::tryFromValue($request->getDataInt('datatype')) ?? AttributeValueType::_STRING; $attrType->custom = $request->getDataBool('custom') ?? false; $attrType->isRequired = $request->getDataBool('is_required') ?? false; + $attrType->isRepeatable = $request->getDataBool('is_repeatable') ?? false; $attrType->validationPattern = $request->getDataString('validation_pattern') ?? ''; $attrType->setL11n( $request->getDataString('title') ?? '', diff --git a/Models/AttributeType.php b/Models/AttributeType.php index d5c68f2..33ba733 100755 --- a/Models/AttributeType.php +++ b/Models/AttributeType.php @@ -63,7 +63,7 @@ class AttributeType implements \JsonSerializable public bool $isRequired = false; - public bool $repeatable = false; + public bool $isRepeatable = false; public bool $isInternal = false; @@ -240,7 +240,7 @@ class AttributeType implements \JsonSerializable 'custom' => $this->custom, 'isRequired' => $this->isRequired, 'isInternal' => $this->isInternal, - 'repeatable' => $this->repeatable, + 'isRepeatable' => $this->isRepeatable, ]; } diff --git a/Models/AttributeTypeMapper.php b/Models/AttributeTypeMapper.php index 84773bf..875d05e 100755 --- a/Models/AttributeTypeMapper.php +++ b/Models/AttributeTypeMapper.php @@ -43,6 +43,7 @@ final class AttributeTypeMapper extends DataMapperFactory 'attribute_attr_type_custom' => ['name' => 'attribute_attr_type_custom', 'type' => 'bool', 'internal' => 'custom'], 'attribute_attr_type_pattern' => ['name' => 'attribute_attr_type_pattern', 'type' => 'string', 'internal' => 'validationPattern'], 'attribute_attr_type_required' => ['name' => 'attribute_attr_type_required', 'type' => 'bool', 'internal' => 'isRequired'], + 'attribute_attr_type_repeatable' => ['name' => 'attribute_attr_type_repeatable', 'type' => 'bool', 'internal' => 'isRepeatable'], ]; /** diff --git a/Theme/Backend/Components/type-view.tpl.php b/Theme/Backend/Components/type-view.tpl.php index b79e0dd..72e595a 100644 --- a/Theme/Backend/Components/type-view.tpl.php +++ b/Theme/Backend/Components/type-view.tpl.php @@ -66,12 +66,20 @@ echo $this->data['nav']->render(); ?>
+
+ +
+