Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions modules/button/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ module:
id:
type: 'id'

button_classes:
type: 'class'

button_style:
type: 'choice'
type_options:
default_value: 'btn btn-primary'
choices:
"button.form.button_style.values.primary": 'btn btn-primary'
"button.form.button_style.values.secondary": 'btn btn-secondary'
Expand All @@ -23,10 +27,6 @@ module:
"button.form.button_style.values.outline_success": 'btn btn-outline-success'
"button.form.button_style.values.outline_danger": 'btn btn-outline-danger'
"button.form.button_style.values.none": ''
choice_translation_domain: false

button_classes:
type: 'class'

button_text:
type: 'translatable'
Expand Down
37 changes: 19 additions & 18 deletions modules/button/form.html.twig
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<div class="row">
<div class="col-12">
{{ form_row(form.id) }}
</div>
<div class="col-12">
{{ form_row(form.button_style) }}
</div>
<div class="col-12">
{{ form_row(form.button_classes) }}
</div>
<div class="col-12">
{{ form_row(form.button_text) }}
</div>
<div class="col-12">
{{ form_widget(form.button_link) }}
</div>
</div>
{{ form_rest(form) }}
{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'button', 'accordion': accordion, 'open': true } %}
{% block form %}
<div class="col-12">
{{ form_widget(form.id) }}
</div>
<div class="col-12">
{{ form_row(form.button_classes) }}
</div>
<div class="col-12">
{{ form_row(form.button_style) }}
</div>
<div class="col-12">
{{ form_row(form.button_text) }}
</div>
<div class="col-12">
{{ form_widget(form.button_link) }}
</div>
{% endblock %}
{% endembed %}
12 changes: 8 additions & 4 deletions modules/button/translations/sfs_cms_modules.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,28 @@ button:
prototype_button: "Button"
prototype_button_icon: '<i class="bi bi-link"></i>'
form:
_group:
filters: "Filters"
others: "Others"
button: "Button"
locale_filter.label: "Locales"
site_filter.label: "Sites"
id.label: "Id"
class.label: "Classes"
button_text:
label: "Button text"
label: "Text"
placeholder: "Button"
button_classes.label: "Button classes"
button_classes.label: "Classes"
button_link:
type.label: "Button link type"
type.label: "Link type"
route_name.label: "Route"
route_params.label: "Route parameters"
anchor.label: "Anchor"
target.label: "Target"
custom_target.label: "Target id"
url.label: "Direct URL"
button_style:
label: "Button style"
label: "Style"
values:
primary: "Primary"
secondary: "Secondary"
Expand Down
14 changes: 9 additions & 5 deletions modules/button/translations/sfs_cms_modules.es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,28 @@ button:
prototype_button: "Botón"
prototype_button_icon: '<i class="bi bi-link"></i>'
form:
_group:
filters: "Filtros"
others: "Otros"
button: "Botón"
locale_filter.label: "Idiomas"
site_filter.label: "Sites"
id.label: "Id"
class.label: "Clases"
button_text:
label: "Texto del botón"
label: "Texto"
placeholder: "Botón"
button_classes.label: "Clases del botón"
button_classes.label: "Clases"
button_link:
type.label: "Tipo de link del botón"
type.label: "Tipo de link"
route_name.label: "Ruta"
route_params.label: "Parámetros de la ruta"
anchor.label: "Anchor"
target.label: "Target"
custom_target.label: "Identificador de target"
url.label: "URL directa"
button_style:
label: "Estilo del botón"
label: "Estilo"
values:
primary: "Primario"
secondary: "Secundario"
Expand All @@ -33,4 +37,4 @@ button:
outline_danger: "Error hueco"
none: "Ninguno"
button_classes:
label: "Estilo del botón personalizado (clases CSS)"
label: "Estilo personalizado (clases CSS)"
98 changes: 57 additions & 41 deletions modules/card/form.html.twig
Original file line number Diff line number Diff line change
@@ -1,45 +1,61 @@
<div class="row">
<div class="col-12">
{{ form_row(form.id) }}
</div>
<div class="col-12">
{{ form_row(form.class) }}
</div>
{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'attributes', 'accordion': accordion } %}
{% block form %}
<div class="col-12 mb-3">
{{ form_widget(form.id) }}
</div>
<div class="col-12 mb-3">
{{ form_widget(form.class) }}
</div>
<div class="col-12">
{{ form_row(form.content_position) }}
</div>
{% endblock %}
{% endembed %}

<div class="col-12">
{{ form_row(form.content_position) }}
</div>
{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'background', 'accordion': accordion } %}
{% block form %}
<div class="col-12">
{{ form_row(form.background) }}
</div>
<div class="col-12">
{{ form_row(form.bg_color) }}
</div>
{% endblock %}
{% endembed %}

<div class="col-12">
{{ form_row(form.title) }}
</div>
<div class="col-12">
{{ form_row(form.title_type) }}
</div>
<div class="col-12">
{{ form_row(form.title_class) }}
</div>
<div class="col-12">
{{ form_row(form.media) }}
</div>
{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'title', 'accordion': accordion } %}
{% block form %}
<div class="col-12 mb-3">
{{ form_widget(form.title_type) }}
</div>
<div class="col-12 mb-3">
{{ form_widget(form.title_class) }}
</div>
<div class="col-12">
{{ form_widget(form.title) }}
</div>
{% endblock %}
{% endembed %}

<div class="col-12">
{{ form_row(form.primary_button_text) }}
</div>
<div class="col-12">
{{ form_widget(form.primary_button_link) }}
</div>
<div class="col-12">
{{ form_row(form.primary_button_class) }}
</div>
{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'image', 'accordion': accordion } %}
{% block title %}Image{% endblock %}
{% block form %}
<div class="col-12">
{{ form_widget(form.media) }}
</div>
{% endblock %}
{% endembed %}


<div class="col-12">
{{ form_row(form.background) }}
</div>

<div class="col-12">
{{ form_row(form.bg_color) }}
</div>
</div>
{{ form_rest(form) }}
{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'primary_button', 'accordion': accordion } %}
{% block form %}
<div class="col-12 mb-3">
{{ form_widget(form.primary_button_class) }}
</div>
<div class="col-12 mb-3">
{{ form_widget(form.primary_button_text) }}
</div>
<div class="col-12">
{{ form_widget(form.primary_button_link) }}
</div>
{% endblock %}
{% endembed %}
13 changes: 10 additions & 3 deletions modules/card/translations/sfs_cms_modules.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ card:
prototype_button: "Card"
prototype_button_icon: '<i class="bi bi-credit-card-2-front"></i>'
form:
_group:
filters: "Filters"
others: "Others"
attributes: "Attributes"
background: "Background"
title: "Title"
primary_button: "Button"
locale_filter.label: "Locales"
site_filter.label: "Sites"
background.label: "Background image"
Expand All @@ -24,17 +31,17 @@ card:
description:
label: "Description"
placeholder: "Card description"
primary_button_text.label: "Primary button text"
primary_button_text.label: "Text"
primary_button_link:
type.label: "Primary button link type"
type.label: "Link type"
route_name.label: "Route"
route_params.label: "Route parameters"
anchor.label: "Anchor"
target.label: "Target"
custom_target.label: "Target id"
url.label: "Direct URL"
bg_color.label: "Background color"
primary_button_class.label: "Primary button classes"
primary_button_class.label: "Classes"
content_position.label: "Content position"
content_position.values:
left: "Left"
Expand Down
13 changes: 10 additions & 3 deletions modules/card/translations/sfs_cms_modules.es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ card:
prototype_button: "Card"
prototype_button_icon: '<i class="bi bi-credit-card-2-front"></i>'
form:
_group:
filters: "Filtros"
others: "Otros"
attributes: "Atributos"
background: "Fondo"
title: "Título"
primary_button: "Botón"
locale_filter.label: "Idiomas"
site_filter.label: "Sites"
background.label: "Imagen de fondo"
Expand All @@ -24,17 +31,17 @@ card:
description:
label: "Descripción"
placeholder: "Descripción de la tarjeta"
primary_button_text.label: "Texto del botón primario"
primary_button_text.label: "Texto"
primary_button_link:
type.label: "Tipo de enlace del botón primario"
type.label: "Tipo de enlace"
route_name.label: "Ruta"
route_params.label: "Parámetros de la ruta"
anchor.label: "Ancla"
target.label: "Target"
custom_target.label: "Identificador de target"
url.label: "URL directa"
bg_color.label: "Color de fondo"
primary_button_class.label: "Classes del botón primario"
primary_button_class.label: "Classes"
content_position.label: "Posición del contenido"
content_position.values:
left: "Izquierda"
Expand Down
1 change: 1 addition & 0 deletions modules/carousel/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module:
revision: 1
group: 'container'
edit_template: '@module/carousel/edit.html.twig'
form_template: '@module/carousel/form.html.twig'
module_type: 'Softspring\CmsBundle\Form\Module\ContainerModuleType'
module_options:
module_collection_class: 'row'
Expand Down
39 changes: 39 additions & 0 deletions modules/carousel/form.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'attributes', 'accordion': accordion } %}
{% block form %}
<div class="col-12 mb-3">
{{ form_widget(form.id) }}
</div>
<div class="col-12">
{{ form_widget(form.class) }}
</div>
{% endblock %}
{% endembed %}

{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'background', 'accordion': accordion } %}
{% block form %}
<div class="col-12">
{{ form_widget(form.bg_color) }}
</div>
{% endblock %}
{% endembed %}

{% embed '@SfsCms/forms/modules_form_block.html.twig' with { 'name': 'properties', 'accordion': accordion, 'open': true } %}
{% block form %}
<div class="col-12">
{{ form_row(form.items_per_slide) }}
</div>
<div class="col-12">
{{ form_row(form.infinite_loop) }}
</div>
<div class="col-12">
{{ form_row(form.auto_play) }}
</div>
<div class="col-12">
{{ form_row(form.navigation) }}
</div>
<div class="col-12">
{{ form_row(form.pagination) }}
</div>
{% endblock %}
{% endembed %}

6 changes: 6 additions & 0 deletions modules/carousel/translations/sfs_cms_modules.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ carousel:
prototype_button: "Carousel"
prototype_button_icon: '<i class="bi bi-distribute-horizontal"></i>'
form:
_group:
filters: "Filters"
others: "Others"
attributes: "Attributes"
background: "Background"
properties: "Properties"
locale_filter.label: "Locales"
site_filter.label: "Sites"
modules.label: "Modules"
Expand Down
6 changes: 6 additions & 0 deletions modules/carousel/translations/sfs_cms_modules.es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ carousel:
prototype_button: "Carrusel"
prototype_button_icon: '<i class="bi bi-distribute-horizontal"></i>'
form:
_group:
filters: "Filtros"
others: "Otros"
attributes: "Atributos"
background: "Fondo"
properties: "Propiedades"
locale_filter.label: "Idiomas"
site_filter.label: "Sites"
modules.label: "Módulos"
Expand Down
Loading