poc override a widget template

This commit is contained in:
Benjamin Dalsass
2023-11-28 16:52:52 +01:00
parent 77cb080231
commit f6e08d6c0c
2 changed files with 39 additions and 0 deletions

View File

@@ -94,3 +94,21 @@ form label.locked:after{
form label.dependent{
color: #2757af;
}
/* overriding theme template */
.overriding_text_row{
border: 1px solid #00aac1;
padding: 15px;
}
.overriding_text_label{
color: #00aac1;
}
.overriding_text_widget{
border: 1px solid #00aac1;
border-radius: 20px;
outline: none;
}

View File

@@ -0,0 +1,21 @@
{%- block text_row -%}
<div class="overriding_text_row">
{{ form_label(form) }}
{{ form_errors(form) }}
{{ form_widget(form) }}
</div>
{%- endblock text_row -%}
{%- block text_label -%}
<label class="overriding_text_label">The label</label>
{%- endblock text_label -%}
{%- block text_widget -%}
<input class="overriding_text_widget" type="text" {{ block('widget_attributes') -}}>
{%- endblock text_widget -%}