From bd9a12c7490a6dc6f641dbeea7718ab7dc7d5c93 Mon Sep 17 00:00:00 2001 From: "Javi H. Gil" Date: Thu, 23 Nov 2023 14:04:07 +0100 Subject: [PATCH 01/13] Group modules edition form fields into accordions --- cms/modules/block_instance/form.html.twig | 34 ++++++++----- .../translations/sfs_cms_modules.en.yaml | 5 ++ .../translations/sfs_cms_modules.es.yaml | 5 ++ .../block_instance_by_type/form.html.twig | 34 ++++++++----- .../translations/sfs_cms_modules.en.yaml | 5 ++ .../translations/sfs_cms_modules.es.yaml | 5 ++ cms/modules/block_static/form.html.twig | 34 ++++++++----- .../translations/sfs_cms_modules.en.yaml | 5 ++ .../translations/sfs_cms_modules.es.yaml | 5 ++ cms/modules/container/form.html.twig | 28 +++++++++++ .../translations/sfs_cms_modules.en.yaml | 4 ++ .../translations/sfs_cms_modules.es.yaml | 4 ++ cms/modules/css/form.html.twig | 15 +++--- .../css/translations/sfs_cms_modules.en.yaml | 5 ++ .../css/translations/sfs_cms_modules.es.yaml | 5 ++ cms/modules/grid/form.html.twig | 28 +++++++++++ .../grid/translations/sfs_cms_modules.en.yaml | 4 ++ .../grid/translations/sfs_cms_modules.es.yaml | 4 ++ cms/modules/html/form.html.twig | 34 ++++++++----- .../html/translations/sfs_cms_modules.en.yaml | 5 ++ .../html/translations/sfs_cms_modules.es.yaml | 5 ++ cms/modules/html_headers/form.html.twig | 15 +++--- .../translations/sfs_cms_modules.en.yaml | 5 ++ .../translations/sfs_cms_modules.es.yaml | 5 ++ cms/modules/html_translatable/form.html.twig | 35 ++++++++----- .../translations/sfs_cms_modules.en.yaml | 5 ++ .../translations/sfs_cms_modules.es.yaml | 5 ++ templates/forms/modules_form_block.html.twig | 15 ++++++ templates/forms/modules_theme.html.twig | 50 ++++++++++++------- 29 files changed, 319 insertions(+), 89 deletions(-) create mode 100644 cms/modules/container/form.html.twig create mode 100644 cms/modules/grid/form.html.twig create mode 100644 templates/forms/modules_form_block.html.twig diff --git a/cms/modules/block_instance/form.html.twig b/cms/modules/block_instance/form.html.twig index 5ff679fe..54143afb 100644 --- a/cms/modules/block_instance/form.html.twig +++ b/cms/modules/block_instance/form.html.twig @@ -1,12 +1,22 @@ -
-
- {{ form_row(form.id) }} -
-
- {{ form_row(form.class) }} -
-
- {{ form_row(form.block) }} -
-
-{{ form_rest(form) }} \ No newline at end of file +{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'attributes', 'accordion': accordion } %} + {% block form %} +
+
+ {{ form_row(form.id) }} +
+
+ {{ form_row(form.class) }} +
+
+ {% endblock %} +{% endembed %} + +{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'block', 'accordion': accordion, 'open': true } %} + {% block form %} +
+
+ {{ form_row(form.block) }} +
+
+ {% endblock %} +{% endembed %} \ No newline at end of file diff --git a/cms/modules/block_instance/translations/sfs_cms_modules.en.yaml b/cms/modules/block_instance/translations/sfs_cms_modules.en.yaml index 67c27f14..d1e96c66 100644 --- a/cms/modules/block_instance/translations/sfs_cms_modules.en.yaml +++ b/cms/modules/block_instance/translations/sfs_cms_modules.en.yaml @@ -3,6 +3,11 @@ block_instance: prototype_button: "Block instance" prototype_button_icon: '' form: + _group: + filters: "Filters" + others: "Others" + attributes: "Attributes" + block: "Block" locale_filter.label: "Locales" site_filter.label: "Sites" id.label: "Id" diff --git a/cms/modules/block_instance/translations/sfs_cms_modules.es.yaml b/cms/modules/block_instance/translations/sfs_cms_modules.es.yaml index 3cff3cec..5143698d 100644 --- a/cms/modules/block_instance/translations/sfs_cms_modules.es.yaml +++ b/cms/modules/block_instance/translations/sfs_cms_modules.es.yaml @@ -3,6 +3,11 @@ block_instance: prototype_button: "Instancia de bloque" prototype_button_icon: '' form: + _group: + filters: "Filtros" + others: "Otros" + attributes: "Atributos" + block: "Bloque" locale_filter.label: "Idiomas" site_filter.label: "Sites" id.label: "Id" diff --git a/cms/modules/block_instance_by_type/form.html.twig b/cms/modules/block_instance_by_type/form.html.twig index 5ff679fe..54143afb 100644 --- a/cms/modules/block_instance_by_type/form.html.twig +++ b/cms/modules/block_instance_by_type/form.html.twig @@ -1,12 +1,22 @@ -
-
- {{ form_row(form.id) }} -
-
- {{ form_row(form.class) }} -
-
- {{ form_row(form.block) }} -
-
-{{ form_rest(form) }} \ No newline at end of file +{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'attributes', 'accordion': accordion } %} + {% block form %} +
+
+ {{ form_row(form.id) }} +
+
+ {{ form_row(form.class) }} +
+
+ {% endblock %} +{% endembed %} + +{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'block', 'accordion': accordion, 'open': true } %} + {% block form %} +
+
+ {{ form_row(form.block) }} +
+
+ {% endblock %} +{% endembed %} \ No newline at end of file diff --git a/cms/modules/block_instance_by_type/translations/sfs_cms_modules.en.yaml b/cms/modules/block_instance_by_type/translations/sfs_cms_modules.en.yaml index 1d4032e4..00c5a251 100644 --- a/cms/modules/block_instance_by_type/translations/sfs_cms_modules.en.yaml +++ b/cms/modules/block_instance_by_type/translations/sfs_cms_modules.en.yaml @@ -3,6 +3,11 @@ block_instance_by_type: prototype_button: "Block by type" prototype_button_icon: '' form: + _group: + filters: "Filters" + others: "Others" + attributes: "Attributes" + block: "Block" locale_filter.label: "Locales" site_filter.label: "Sites" id.label: "Id" diff --git a/cms/modules/block_instance_by_type/translations/sfs_cms_modules.es.yaml b/cms/modules/block_instance_by_type/translations/sfs_cms_modules.es.yaml index 8ad5c3e5..8e44979c 100644 --- a/cms/modules/block_instance_by_type/translations/sfs_cms_modules.es.yaml +++ b/cms/modules/block_instance_by_type/translations/sfs_cms_modules.es.yaml @@ -3,6 +3,11 @@ block_instance_by_type: prototype_button: "Bloque por tipo" prototype_button_icon: '' form: + _group: + filters: "Filtros" + others: "Otros" + attributes: "Atributos" + block: "Bloque" locale_filter.label: "Idiomas" site_filter.label: "Sites" id.label: "Id" diff --git a/cms/modules/block_static/form.html.twig b/cms/modules/block_static/form.html.twig index 5ff679fe..54143afb 100644 --- a/cms/modules/block_static/form.html.twig +++ b/cms/modules/block_static/form.html.twig @@ -1,12 +1,22 @@ -
-
- {{ form_row(form.id) }} -
-
- {{ form_row(form.class) }} -
-
- {{ form_row(form.block) }} -
-
-{{ form_rest(form) }} \ No newline at end of file +{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'attributes', 'accordion': accordion } %} + {% block form %} +
+
+ {{ form_row(form.id) }} +
+
+ {{ form_row(form.class) }} +
+
+ {% endblock %} +{% endembed %} + +{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'block', 'accordion': accordion, 'open': true } %} + {% block form %} +
+
+ {{ form_row(form.block) }} +
+
+ {% endblock %} +{% endembed %} \ No newline at end of file diff --git a/cms/modules/block_static/translations/sfs_cms_modules.en.yaml b/cms/modules/block_static/translations/sfs_cms_modules.en.yaml index 77cd5c67..141f0897 100644 --- a/cms/modules/block_static/translations/sfs_cms_modules.en.yaml +++ b/cms/modules/block_static/translations/sfs_cms_modules.en.yaml @@ -3,6 +3,11 @@ block_static: prototype_button: "Static block" prototype_button_icon: '' form: + _group: + filters: "Filters" + others: "Others" + attributes: "Attributes" + block: "Block" locale_filter.label: "Locales" site_filter.label: "Sites" id.label: "Id" diff --git a/cms/modules/block_static/translations/sfs_cms_modules.es.yaml b/cms/modules/block_static/translations/sfs_cms_modules.es.yaml index 7f442664..da131aea 100644 --- a/cms/modules/block_static/translations/sfs_cms_modules.es.yaml +++ b/cms/modules/block_static/translations/sfs_cms_modules.es.yaml @@ -3,6 +3,11 @@ block_static: prototype_button: "Bloque estático" prototype_button_icon: '' form: + _group: + filters: "Filtros" + others: "Otros" + attributes: "Atributos" + block: "Bloque" locale_filter.label: "Idiomas" site_filter.label: "Sites" id.label: "Id" diff --git a/cms/modules/container/form.html.twig b/cms/modules/container/form.html.twig new file mode 100644 index 00000000..5f1fc245 --- /dev/null +++ b/cms/modules/container/form.html.twig @@ -0,0 +1,28 @@ +{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'attributes', 'accordion': accordion } %} + {% block form %} +
+
+ {{ form_row(form.id) }} +
+
+ {{ form_row(form.class) }} +
+
+ {% endblock %} +{% endembed %} + +{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'properties', 'accordion': accordion, 'open': true } %} + {% block form %} +
+
+ {{ form_row(form.container_type) }} +
+
+ {{ form_row(form.tag_type) }} +
+
+ {{ form_row(form.bg_color) }} +
+
+ {% endblock %} +{% endembed %} \ No newline at end of file diff --git a/cms/modules/container/translations/sfs_cms_modules.en.yaml b/cms/modules/container/translations/sfs_cms_modules.en.yaml index 4398b32d..275f7fa1 100644 --- a/cms/modules/container/translations/sfs_cms_modules.en.yaml +++ b/cms/modules/container/translations/sfs_cms_modules.en.yaml @@ -3,6 +3,10 @@ container: prototype_button: "Container" prototype_button_icon: '' form: + _group: + filters: "Filters" + others: "Others" + attributes: "Attributes" locale_filter.label: "Locales" site_filter.label: "Sites" modules.label: "Modules" diff --git a/cms/modules/container/translations/sfs_cms_modules.es.yaml b/cms/modules/container/translations/sfs_cms_modules.es.yaml index 3c89bfb5..554702a3 100644 --- a/cms/modules/container/translations/sfs_cms_modules.es.yaml +++ b/cms/modules/container/translations/sfs_cms_modules.es.yaml @@ -3,6 +3,10 @@ container: prototype_button: "Contenedor" prototype_button_icon: '' form: + _group: + filters: "Filtros" + others: "Otros" + attributes: "Atributos" locale_filter.label: "Idiomas" site_filter.label: "Sites" modules.label: "Módulos" diff --git a/cms/modules/css/form.html.twig b/cms/modules/css/form.html.twig index 84c34cd0..fbad1c4d 100644 --- a/cms/modules/css/form.html.twig +++ b/cms/modules/css/form.html.twig @@ -1,6 +1,9 @@ -
-
- {{ form_row(form.css, {'attr': {'style': 'min-height: 400px'}}) }} -
-
-{{ form_rest(form) }} +{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'code', 'accordion': accordion, 'open': true } %} + {% block form %} +
+
+ {{ form_row(form.css, {'attr': {'style': 'min-height: 400px'}}) }} +
+
+ {% endblock %} +{% endembed %} \ No newline at end of file diff --git a/cms/modules/css/translations/sfs_cms_modules.en.yaml b/cms/modules/css/translations/sfs_cms_modules.en.yaml index 54af9350..d206b060 100644 --- a/cms/modules/css/translations/sfs_cms_modules.en.yaml +++ b/cms/modules/css/translations/sfs_cms_modules.en.yaml @@ -3,6 +3,11 @@ css: prototype_button: "CSS code" prototype_button_icon: '' form: + _group: + filters: "Filters" + others: "Others" + attributes: "Attributes" + code: "Code" locale_filter.label: "Locales" site_filter.label: "Sites" css.label: "CSS styles" diff --git a/cms/modules/css/translations/sfs_cms_modules.es.yaml b/cms/modules/css/translations/sfs_cms_modules.es.yaml index bb691f5a..cdd34dfe 100644 --- a/cms/modules/css/translations/sfs_cms_modules.es.yaml +++ b/cms/modules/css/translations/sfs_cms_modules.es.yaml @@ -3,6 +3,11 @@ css: prototype_button: "Código CSS" prototype_button_icon: '' form: + _group: + filters: "Filtros" + others: "Otros" + attributes: "Atributos" + code: "Código" locale_filter.label: "Idiomas" site_filter.label: "Sites" css.label: "Estilos CSS" diff --git a/cms/modules/grid/form.html.twig b/cms/modules/grid/form.html.twig new file mode 100644 index 00000000..580441ed --- /dev/null +++ b/cms/modules/grid/form.html.twig @@ -0,0 +1,28 @@ +{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'attributes', 'accordion': accordion } %} + {% block form %} +
+
+ {{ form_row(form.id) }} +
+
+ {{ form_row(form.class) }} +
+
+ {% endblock %} +{% endembed %} + +{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'properties', 'accordion': accordion, 'open': true } %} + {% block form %} +
+
+ {{ form_row(form.node_row_class) }} +
+
+ {{ form_row(form.node_row_class_custom) }} +
+
+ {{ form_row(form.bg_color) }} +
+
+ {% endblock %} +{% endembed %} \ No newline at end of file diff --git a/cms/modules/grid/translations/sfs_cms_modules.en.yaml b/cms/modules/grid/translations/sfs_cms_modules.en.yaml index 41857101..7e5c1d62 100644 --- a/cms/modules/grid/translations/sfs_cms_modules.en.yaml +++ b/cms/modules/grid/translations/sfs_cms_modules.en.yaml @@ -3,6 +3,10 @@ grid: prototype_button: "Grid" prototype_button_icon: '' form: + _group: + filters: "Filters" + others: "Others" + attributes: "Attributes" locale_filter.label: "Locales" site_filter.label: "Sites" modules.label: "Modules" diff --git a/cms/modules/grid/translations/sfs_cms_modules.es.yaml b/cms/modules/grid/translations/sfs_cms_modules.es.yaml index 521f23fa..3084409b 100644 --- a/cms/modules/grid/translations/sfs_cms_modules.es.yaml +++ b/cms/modules/grid/translations/sfs_cms_modules.es.yaml @@ -3,6 +3,10 @@ grid: prototype_button: "Grid" prototype_button_icon: '' form: + _group: + filters: "Filtros" + others: "Otros" + attributes: "Atributos" locale_filter.label: "Idiomas" site_filter.label: "Sites" modules.label: "Módulos" diff --git a/cms/modules/html/form.html.twig b/cms/modules/html/form.html.twig index 24028356..d51452d0 100644 --- a/cms/modules/html/form.html.twig +++ b/cms/modules/html/form.html.twig @@ -1,12 +1,22 @@ -
-
- {{ form_row(form.id) }} -
-
- {{ form_row(form.class) }} -
-
- {{ form_row(form.code) }} -
-
-{{ form_rest(form) }} \ No newline at end of file +{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'attributes', 'accordion': accordion } %} + {% block form %} +
+
+ {{ form_row(form.id) }} +
+
+ {{ form_row(form.class) }} +
+
+ {% endblock %} +{% endembed %} + +{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'code', 'accordion': accordion, 'open': true } %} + {% block form %} +
+
+ {{ form_row(form.code, {'attr': {'style': 'min-height: 400px'}}) }} +
+
+ {% endblock %} +{% endembed %} \ No newline at end of file diff --git a/cms/modules/html/translations/sfs_cms_modules.en.yaml b/cms/modules/html/translations/sfs_cms_modules.en.yaml index bb31db76..3c7d5510 100644 --- a/cms/modules/html/translations/sfs_cms_modules.en.yaml +++ b/cms/modules/html/translations/sfs_cms_modules.en.yaml @@ -3,6 +3,11 @@ html: prototype_button: "HTML code" prototype_button_icon: '' form: + _group: + filters: "Filters" + others: "Others" + attributes: "Attributes" + code: "Code" locale_filter.label: "Locales" site_filter.label: "Sites" id.label: "Id" diff --git a/cms/modules/html/translations/sfs_cms_modules.es.yaml b/cms/modules/html/translations/sfs_cms_modules.es.yaml index 60b89bde..c70f0ef2 100644 --- a/cms/modules/html/translations/sfs_cms_modules.es.yaml +++ b/cms/modules/html/translations/sfs_cms_modules.es.yaml @@ -3,6 +3,11 @@ html: prototype_button: "Código HTML" prototype_button_icon: '' form: + _group: + filters: "Filtros" + others: "Otros" + attributes: "Atributos" + code: "Código" locale_filter.label: "Idiomas" site_filter.label: "Sites" id.label: "Id" diff --git a/cms/modules/html_headers/form.html.twig b/cms/modules/html_headers/form.html.twig index ca1ca2b2..d02515af 100644 --- a/cms/modules/html_headers/form.html.twig +++ b/cms/modules/html_headers/form.html.twig @@ -1,6 +1,9 @@ -
-
- {{ form_row(form.code, {'attr': {'style': 'min-height: 400px'}}) }} -
-
-{{ form_rest(form) }} +{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'code', 'accordion': accordion, 'open': true } %} + {% block form %} +
+
+ {{ form_row(form.code, {'attr': {'style': 'min-height: 400px'}}) }} +
+
+ {% endblock %} +{% endembed %} \ No newline at end of file diff --git a/cms/modules/html_headers/translations/sfs_cms_modules.en.yaml b/cms/modules/html_headers/translations/sfs_cms_modules.en.yaml index b4c096b9..54c6f1f9 100644 --- a/cms/modules/html_headers/translations/sfs_cms_modules.en.yaml +++ b/cms/modules/html_headers/translations/sfs_cms_modules.en.yaml @@ -3,6 +3,11 @@ html_headers: prototype_button: "HTML headers" prototype_button_icon: '' form: + _group: + filters: "Filters" + others: "Others" + attributes: "Attributes" + code: "Code" locale_filter.label: "Locales" site_filter.label: "Sites" code: diff --git a/cms/modules/html_headers/translations/sfs_cms_modules.es.yaml b/cms/modules/html_headers/translations/sfs_cms_modules.es.yaml index aa30fee8..2cc6f8a3 100644 --- a/cms/modules/html_headers/translations/sfs_cms_modules.es.yaml +++ b/cms/modules/html_headers/translations/sfs_cms_modules.es.yaml @@ -3,6 +3,11 @@ html_headers: prototype_button: "Cabeceras HTML" prototype_button_icon: '' form: + _group: + filters: "Filtros" + others: "Otros" + attributes: "Atributos" + code: "Código" locale_filter.label: "Idiomas" site_filter.label: "Sites" code: diff --git a/cms/modules/html_translatable/form.html.twig b/cms/modules/html_translatable/form.html.twig index 24028356..c2bcaf45 100644 --- a/cms/modules/html_translatable/form.html.twig +++ b/cms/modules/html_translatable/form.html.twig @@ -1,12 +1,23 @@ -
-
- {{ form_row(form.id) }} -
-
- {{ form_row(form.class) }} -
-
- {{ form_row(form.code) }} -
-
-{{ form_rest(form) }} \ No newline at end of file +{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'attributes', 'accordion': accordion } %} + {% block form %} +
+
+ {{ form_row(form.id) }} +
+
+ {{ form_row(form.class) }} +
+
+ {% endblock %} +{% endembed %} + + +{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'code', 'accordion': accordion, 'open': true } %} + {% block form %} +
+
+ {{ form_row(form.code, {'attr': {'style': 'min-height: 400px'}}) }} +
+
+ {% endblock %} +{% endembed %} \ No newline at end of file diff --git a/cms/modules/html_translatable/translations/sfs_cms_modules.en.yaml b/cms/modules/html_translatable/translations/sfs_cms_modules.en.yaml index 0ab5d1ab..bb3a2ed7 100644 --- a/cms/modules/html_translatable/translations/sfs_cms_modules.en.yaml +++ b/cms/modules/html_translatable/translations/sfs_cms_modules.en.yaml @@ -3,6 +3,11 @@ html_translatable: prototype_button: "Translatable HTML" prototype_button_icon: '' form: + _group: + filters: "Filters" + others: "Others" + attributes: "Attributes" + code: "Code" locale_filter.label: "Locales" site_filter.label: "Sites" id.label: "Id" diff --git a/cms/modules/html_translatable/translations/sfs_cms_modules.es.yaml b/cms/modules/html_translatable/translations/sfs_cms_modules.es.yaml index 9fb9c216..b0e4488d 100644 --- a/cms/modules/html_translatable/translations/sfs_cms_modules.es.yaml +++ b/cms/modules/html_translatable/translations/sfs_cms_modules.es.yaml @@ -3,6 +3,11 @@ html_translatable: prototype_button: "HTML traducible" prototype_button_icon: '' form: + _group: + filters: "Filtros" + others: "Otros" + attributes: "Atributos" + code: "Código" locale_filter.label: "Idiomas" site_filter.label: "Sites" id.label: "Id" diff --git a/templates/forms/modules_form_block.html.twig b/templates/forms/modules_form_block.html.twig new file mode 100644 index 00000000..5f142993 --- /dev/null +++ b/templates/forms/modules_form_block.html.twig @@ -0,0 +1,15 @@ +{% set itemId = 'block_'~random(1..100000) %} +{% set open = open is defined ? open : false %} +
+

+ +

+
+
+ {% block form %}{% endblock %} +
+
+
\ No newline at end of file diff --git a/templates/forms/modules_theme.html.twig b/templates/forms/modules_theme.html.twig index 07814a42..1223a554 100644 --- a/templates/forms/modules_theme.html.twig +++ b/templates/forms/modules_theme.html.twig @@ -133,7 +133,7 @@ {# form_name #} -
+
{% if form.vars.errors|length %}
From d5e6bed730fe9ed54b308c2c2791cf7c660ba611 Mon Sep 17 00:00:00 2001 From: "Javi H. Gil" Date: Thu, 23 Nov 2023 15:28:29 +0100 Subject: [PATCH 02/13] Remove rows --- cms/modules/block_instance/form.html.twig | 18 +++++------ .../block_instance_by_type/form.html.twig | 18 +++++------ cms/modules/block_static/form.html.twig | 18 +++++------ cms/modules/container/form.html.twig | 30 ++++++++----------- cms/modules/css/form.html.twig | 6 ++-- cms/modules/grid/form.html.twig | 30 ++++++++----------- cms/modules/html/form.html.twig | 18 +++++------ cms/modules/html_headers/form.html.twig | 6 ++-- cms/modules/html_translatable/form.html.twig | 18 +++++------ templates/forms/modules_form_block.html.twig | 4 +++ templates/forms/modules_theme.html.twig | 10 ++++--- 11 files changed, 75 insertions(+), 101 deletions(-) diff --git a/cms/modules/block_instance/form.html.twig b/cms/modules/block_instance/form.html.twig index 54143afb..9e993488 100644 --- a/cms/modules/block_instance/form.html.twig +++ b/cms/modules/block_instance/form.html.twig @@ -1,22 +1,18 @@ {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'attributes', 'accordion': accordion } %} {% block form %} -
-
- {{ form_row(form.id) }} -
-
- {{ form_row(form.class) }} -
+
+ {{ form_row(form.id) }} +
+
+ {{ form_row(form.class) }}
{% endblock %} {% endembed %} {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'block', 'accordion': accordion, 'open': true } %} {% block form %} -
-
- {{ form_row(form.block) }} -
+
+ {{ form_row(form.block) }}
{% endblock %} {% endembed %} \ No newline at end of file diff --git a/cms/modules/block_instance_by_type/form.html.twig b/cms/modules/block_instance_by_type/form.html.twig index 54143afb..9e993488 100644 --- a/cms/modules/block_instance_by_type/form.html.twig +++ b/cms/modules/block_instance_by_type/form.html.twig @@ -1,22 +1,18 @@ {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'attributes', 'accordion': accordion } %} {% block form %} -
-
- {{ form_row(form.id) }} -
-
- {{ form_row(form.class) }} -
+
+ {{ form_row(form.id) }} +
+
+ {{ form_row(form.class) }}
{% endblock %} {% endembed %} {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'block', 'accordion': accordion, 'open': true } %} {% block form %} -
-
- {{ form_row(form.block) }} -
+
+ {{ form_row(form.block) }}
{% endblock %} {% endembed %} \ No newline at end of file diff --git a/cms/modules/block_static/form.html.twig b/cms/modules/block_static/form.html.twig index 54143afb..9e993488 100644 --- a/cms/modules/block_static/form.html.twig +++ b/cms/modules/block_static/form.html.twig @@ -1,22 +1,18 @@ {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'attributes', 'accordion': accordion } %} {% block form %} -
-
- {{ form_row(form.id) }} -
-
- {{ form_row(form.class) }} -
+
+ {{ form_row(form.id) }} +
+
+ {{ form_row(form.class) }}
{% endblock %} {% endembed %} {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'block', 'accordion': accordion, 'open': true } %} {% block form %} -
-
- {{ form_row(form.block) }} -
+
+ {{ form_row(form.block) }}
{% endblock %} {% endembed %} \ No newline at end of file diff --git a/cms/modules/container/form.html.twig b/cms/modules/container/form.html.twig index 5f1fc245..139cef32 100644 --- a/cms/modules/container/form.html.twig +++ b/cms/modules/container/form.html.twig @@ -1,28 +1,24 @@ {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'attributes', 'accordion': accordion } %} {% block form %} -
-
- {{ form_row(form.id) }} -
-
- {{ form_row(form.class) }} -
+
+ {{ form_row(form.id) }} +
+
+ {{ form_row(form.class) }}
{% endblock %} {% endembed %} {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'properties', 'accordion': accordion, 'open': true } %} {% block form %} -
-
- {{ form_row(form.container_type) }} -
-
- {{ form_row(form.tag_type) }} -
-
- {{ form_row(form.bg_color) }} -
+
+ {{ form_row(form.container_type) }} +
+
+ {{ form_row(form.tag_type) }} +
+
+ {{ form_row(form.bg_color) }}
{% endblock %} {% endembed %} \ No newline at end of file diff --git a/cms/modules/css/form.html.twig b/cms/modules/css/form.html.twig index fbad1c4d..6df97a57 100644 --- a/cms/modules/css/form.html.twig +++ b/cms/modules/css/form.html.twig @@ -1,9 +1,7 @@ {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'code', 'accordion': accordion, 'open': true } %} {% block form %} -
-
- {{ form_row(form.css, {'attr': {'style': 'min-height: 400px'}}) }} -
+
+ {{ form_row(form.css, {'attr': {'style': 'min-height: 400px'}}) }}
{% endblock %} {% endembed %} \ No newline at end of file diff --git a/cms/modules/grid/form.html.twig b/cms/modules/grid/form.html.twig index 580441ed..173317d3 100644 --- a/cms/modules/grid/form.html.twig +++ b/cms/modules/grid/form.html.twig @@ -1,28 +1,24 @@ {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'attributes', 'accordion': accordion } %} {% block form %} -
-
- {{ form_row(form.id) }} -
-
- {{ form_row(form.class) }} -
+
+ {{ form_row(form.id) }} +
+
+ {{ form_row(form.class) }}
{% endblock %} {% endembed %} {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'properties', 'accordion': accordion, 'open': true } %} {% block form %} -
-
- {{ form_row(form.node_row_class) }} -
-
- {{ form_row(form.node_row_class_custom) }} -
-
- {{ form_row(form.bg_color) }} -
+
+ {{ form_row(form.node_row_class) }} +
+
+ {{ form_row(form.node_row_class_custom) }} +
+
+ {{ form_row(form.bg_color) }}
{% endblock %} {% endembed %} \ No newline at end of file diff --git a/cms/modules/html/form.html.twig b/cms/modules/html/form.html.twig index d51452d0..42124b8d 100644 --- a/cms/modules/html/form.html.twig +++ b/cms/modules/html/form.html.twig @@ -1,22 +1,18 @@ {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'attributes', 'accordion': accordion } %} {% block form %} -
-
- {{ form_row(form.id) }} -
-
- {{ form_row(form.class) }} -
+
+ {{ form_row(form.id) }} +
+
+ {{ form_row(form.class) }}
{% endblock %} {% endembed %} {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'code', 'accordion': accordion, 'open': true } %} {% block form %} -
-
- {{ form_row(form.code, {'attr': {'style': 'min-height: 400px'}}) }} -
+
+ {{ form_row(form.code, {'attr': {'style': 'min-height: 400px'}}) }}
{% endblock %} {% endembed %} \ No newline at end of file diff --git a/cms/modules/html_headers/form.html.twig b/cms/modules/html_headers/form.html.twig index d02515af..e106d5be 100644 --- a/cms/modules/html_headers/form.html.twig +++ b/cms/modules/html_headers/form.html.twig @@ -1,9 +1,7 @@ {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'code', 'accordion': accordion, 'open': true } %} {% block form %} -
-
- {{ form_row(form.code, {'attr': {'style': 'min-height: 400px'}}) }} -
+
+ {{ form_row(form.code, {'attr': {'style': 'min-height: 400px'}}) }}
{% endblock %} {% endembed %} \ No newline at end of file diff --git a/cms/modules/html_translatable/form.html.twig b/cms/modules/html_translatable/form.html.twig index c2bcaf45..64268786 100644 --- a/cms/modules/html_translatable/form.html.twig +++ b/cms/modules/html_translatable/form.html.twig @@ -1,12 +1,10 @@ {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'attributes', 'accordion': accordion } %} {% block form %} -
-
- {{ form_row(form.id) }} -
-
- {{ form_row(form.class) }} -
+
+ {{ form_row(form.id) }} +
+
+ {{ form_row(form.class) }}
{% endblock %} {% endembed %} @@ -14,10 +12,8 @@ {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'code', 'accordion': accordion, 'open': true } %} {% block form %} -
-
- {{ form_row(form.code, {'attr': {'style': 'min-height: 400px'}}) }} -
+
+ {{ form_row(form.code, {'attr': {'style': 'min-height: 400px'}}) }}
{% endblock %} {% endembed %} \ No newline at end of file diff --git a/templates/forms/modules_form_block.html.twig b/templates/forms/modules_form_block.html.twig index 5f142993..315320d6 100644 --- a/templates/forms/modules_form_block.html.twig +++ b/templates/forms/modules_form_block.html.twig @@ -1,5 +1,7 @@ {% set itemId = 'block_'~random(1..100000) %} {% set open = open is defined ? open : false %} +{% set row = row is defined ? row : true %} +

\ No newline at end of file diff --git a/templates/forms/modules_theme.html.twig b/templates/forms/modules_theme.html.twig index 1223a554..f4127a27 100644 --- a/templates/forms/modules_theme.html.twig +++ b/templates/forms/modules_theme.html.twig @@ -165,13 +165,15 @@ {% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'filters', 'accordion': 'moduleForm-'~id } %} {% block form %} {% if form.site_filter is defined %} - {{ form_label(form.site_filter) }} - {{ form_widget(form.site_filter) }} +
+ {{ form_row(form.site_filter) }} +
{% endif %} {% if form.locale_filter is defined %} - {{ form_label(form.locale_filter) }} - {{ form_widget(form.locale_filter) }} +
+ {{ form_row(form.locale_filter) }} +
{% endif %} {% endblock %} {% endembed %} From 9b3543f89d81684b69f056219b3c44b531e26582 Mon Sep 17 00:00:00 2001 From: "Javi H. Gil" Date: Fri, 24 Nov 2023 13:21:36 +0100 Subject: [PATCH 03/13] Add missing translations --- templates/forms/modules_theme.html.twig | 2 +- translations/sfs_cms_admin.en.yaml | 2 ++ translations/sfs_cms_admin.es.yaml | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/forms/modules_theme.html.twig b/templates/forms/modules_theme.html.twig index 8882814b..4bf621b6 100644 --- a/templates/forms/modules_theme.html.twig +++ b/templates/forms/modules_theme.html.twig @@ -326,7 +326,7 @@