You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
{% macro input(name, label, type, opt) %}
|
|
|
|
<div class="form-group">
|
|
|
|
{% if label -%}
|
|
|
|
<label for="{{ name }}">{{ label }}</label>
|
|
|
|
{%- endif %}
|
|
|
|
<input type="{{ type|default('text') }}" class="form-control"
|
|
|
|
id="{{ name }}" name="{{ name }}"
|
|
|
|
value="{{ opt.value|default('') }}"
|
|
|
|
{%- if opt.required|default(false) %}
|
|
|
|
required="required"
|
|
|
|
{%- endif -%}
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
{% macro hidden(name, value) %}
|
|
|
|
<input type="hidden" id="{{ name }}" name="{{ name }}" value="{{ value }}">
|
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
{% macro submit(label) %}
|
|
|
|
<button type="submit" class="btn btn-primary">{{ label|default(__('form.submit')) }}</button>
|
|
|
|
{%- endmacro %}
|