mirror of
https://github.com/proelements/proelements.git
synced 2026-04-05 20:13:47 +00:00
28 lines
1.5 KiB
Twig
28 lines
1.5 KiB
Twig
{% set classes = settings.classes | merge( [ base_styles.base ] ) | join(' ') | trim %}
|
|
{% set id_attribute = settings._cssid is not empty ? 'id=' ~ settings._cssid | e('html_attr') : '' %}
|
|
{% set interactions_attribute = interactions is not empty ? 'data-interactions=' ~ interactions | json_encode | e('html_attr') : '' %}
|
|
{% set placeholder_attribute = settings.placeholder is not empty ? 'placeholder=' ~ settings.placeholder | e('html_attr') : '' %}
|
|
{% set required_attribute = settings.required ? 'required' : '' %}
|
|
{% set readonly_attribute = settings.readonly ? 'readonly' : '' %}
|
|
{% set rows_attribute = settings.rows is not empty ? 'rows=' ~ settings.rows | e('html_attr') : '' %}
|
|
{% set minlength_attribute = settings.minlength is not empty ? 'minlength=' ~ settings.minlength | e('html_attr') : '' %}
|
|
{% set maxlength_attribute = settings.maxlength is not empty ? 'maxlength=' ~ settings.maxlength | e('html_attr') : '' %}
|
|
{% set resizable_attribute = settings.resizable ? 'data-resizable' : '' %}
|
|
{% set name = settings.name is not empty ? settings.name : settings._cssid is not empty ? settings._cssid : id %}
|
|
{% set name_attribute = 'name=' ~ name | e('html_attr') %}
|
|
<textarea
|
|
{{ id_attribute }}
|
|
{{ name_attribute }}
|
|
class="{{ classes }}"
|
|
data-interaction-id="{{ id }}"
|
|
{{ settings.attributes | raw }}
|
|
{{ interactions_attribute }}
|
|
{{ placeholder_attribute }}
|
|
{{ required_attribute }}
|
|
{{ readonly_attribute }}
|
|
{{ rows_attribute }}
|
|
{{ minlength_attribute }}
|
|
{{ maxlength_attribute }}
|
|
{{ resizable_attribute }}
|
|
></textarea>
|