2022-08-20 23:31:45 +02:00
|
|
|
{% if model_field.field_type == "TextArea" %}
|
|
|
|
<textarea
|
|
|
|
class="{{ model_field | get_html_input_class }}
|
|
|
|
{% if model.errors | length > 0 or model.custom_errors | length > 0 %}
|
|
|
|
{% if
|
|
|
|
model.errors | get(key=model_field.field_name, default="" ) !=""
|
|
|
|
or
|
|
|
|
model.custom_errors | get(key=model_field.field_name, default="" ) !=""
|
|
|
|
%}is-danger{% else %}is-success{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
"
|
|
|
|
type="{{ model_field | get_html_input_type }}"
|
|
|
|
name="{{ model_field.field_name }}"
|
|
|
|
placeholder="{{ model_field.field_name }}"
|
|
|
|
aria-label="{{ model_field.field_name }}"
|
|
|
|
>{{ model.values | get(key=model_field.field_name, default="") }}</textarea>
|
|
|
|
{% else %}
|
2022-08-05 18:23:51 +02:00
|
|
|
<input
|
2022-08-20 22:51:15 +02:00
|
|
|
class="{{ model_field | get_html_input_class }}
|
2022-08-20 23:31:45 +02:00
|
|
|
{% if model.errors | length > 0 or model.custom_errors | length > 0 %}
|
|
|
|
{% if
|
|
|
|
model.errors | get(key=model_field.field_name, default="" ) !=""
|
|
|
|
or
|
|
|
|
model.custom_errors | get(key=model_field.field_name, default="" ) !=""
|
|
|
|
%}is-danger{% else %}is-success{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
"
|
2022-08-05 18:23:51 +02:00
|
|
|
type="{{ model_field | get_html_input_type }}"
|
2022-08-20 22:51:15 +02:00
|
|
|
value="{{ model.values | get(key=model_field.field_name, default="") }}"
|
2022-08-05 18:23:51 +02:00
|
|
|
name="{{ model_field.field_name }}"
|
|
|
|
placeholder="{{ model_field.field_name }}"
|
|
|
|
aria-label="{{ model_field.field_name }}"
|
2022-08-20 23:31:45 +02:00
|
|
|
>
|
|
|
|
{% endif %}
|