From 6fe1318ada41911d479ac96adfed2b390097a8fb Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Thu, 23 Mar 2023 10:41:07 +0100 Subject: [PATCH 1/4] fix: [template:update_all] Correct usage of modal parameters --- templates/MetaTemplates/update_all.php | 6 ++++-- templates/genericTemplates/confirm.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/templates/MetaTemplates/update_all.php b/templates/MetaTemplates/update_all.php index 95d04af..d42816c 100644 --- a/templates/MetaTemplates/update_all.php +++ b/templates/MetaTemplates/update_all.php @@ -132,8 +132,10 @@ echo $this->Bootstrap->modal([ 'bodyHtml' => $bodyHtml, 'size' => $modalSize, 'type' => $modalType, - 'confirmText' => __('Update meta-templates'), - 'confirmFunction' => 'updateMetaTemplate', + 'confirmButton' => [ + 'text' => __('Update meta-templates'), + 'onclick' => 'updateMetaTemplate', + ], ]); ?> diff --git a/templates/genericTemplates/confirm.php b/templates/genericTemplates/confirm.php index 9910adf..ab68c53 100644 --- a/templates/genericTemplates/confirm.php +++ b/templates/genericTemplates/confirm.php @@ -36,4 +36,4 @@ $modalOptions = array_merge($defaultOptions, $modalOptions ?? []); $modalOptions['bodyHtml'] = $bodyHTML; echo $this->Bootstrap->modal($modalOptions); -?> + From 727c21bd23eb910865290a8b1c54d51055105a16 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Thu, 23 Mar 2023 10:42:02 +0100 Subject: [PATCH 2/4] fix: [template:registration] Correct usage of modal parameters --- .../default/InboxProcessors/templates/User/Registration.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/default/InboxProcessors/templates/User/Registration.php b/libraries/default/InboxProcessors/templates/User/Registration.php index d24ea5b..e47dbc5 100644 --- a/libraries/default/InboxProcessors/templates/User/Registration.php +++ b/libraries/default/InboxProcessors/templates/User/Registration.php @@ -89,8 +89,10 @@ echo $this->Bootstrap->modal([ '
%s
', $combinedForm ), - 'confirmText' => __('Create user'), - 'confirmFunction' => 'submitRegistration' + 'confirmButton' => [ + 'text' => __('Create user'), + 'onclick' => 'submitRegistration', + ], ]); ?> From 1ea0bb9be6f1e733c71187bcb067a8cdb9979573 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Fri, 31 Mar 2023 13:55:48 +0200 Subject: [PATCH 3/4] chg: [command:importer] Make sure to use the latest known version of the template --- src/Command/ImporterCommand.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Command/ImporterCommand.php b/src/Command/ImporterCommand.php index 3aba536..dee4e24 100644 --- a/src/Command/ImporterCommand.php +++ b/src/Command/ImporterCommand.php @@ -158,6 +158,7 @@ class ImporterCommand extends Command if (!$this->noMetaTemplate) { $metaTemplate = $this->MetaTemplates->find() ->where(['uuid' => $config['metaTemplateUUID']]) + ->order(['version' => 'DESC']) ->first(); if (!is_null($metaTemplate)) { $metaTemplateFieldsMapping = $this->MetaTemplates->MetaTemplateFields->find('list', [ @@ -192,6 +193,7 @@ class ImporterCommand extends Command $metaEntity->field = $fieldName; $metaEntity->scope = $table->getBehavior('MetaFields')->getScope(); $metaEntity->meta_template_id = $metaTemplate->id; + $metaEntity->meta_template_directory_id = $metaTemplate->meta_template_directory_id; if (isset($metaTemplateFieldsMapping[$fieldName])) { // a meta field template must exists $metaEntity->meta_template_field_id = $metaTemplateFieldsMapping[$fieldName]; } else { From 5028b4cf247c6114a4c59bf267279367daf5bc30 Mon Sep 17 00:00:00 2001 From: iglocska Date: Wed, 31 May 2023 09:42:15 +0200 Subject: [PATCH 4/4] chg: [version] bump --- src/VERSION.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VERSION.json b/src/VERSION.json index 94e6555..0b24643 100644 --- a/src/VERSION.json +++ b/src/VERSION.json @@ -1,4 +1,4 @@ { - "version": "1.13", + "version": "1.14", "application": "Cerebrate" }