2016-01-07 16:24:43 +00:00
|
|
|
{% macro textbox(name, label, value='', small=True, highlight_tags=False, password=False) %}
|
2015-12-20 00:00:01 +00:00
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="form-label" for="{{ name }}">{{ label }}</label>
|
|
|
|
|
{% if small %}
|
2016-01-07 16:24:43 +00:00
|
|
|
<input class="form-control" id="{{ name }}" name="{{ name }}" type="{{ 'password' if password else 'text' }}" value="{{ value }}">
|
2015-12-20 00:00:01 +00:00
|
|
|
{% else %}
|
2015-12-20 00:00:01 +00:00
|
|
|
<textarea
|
|
|
|
|
class="form-control {% if highlight_tags %}textbox-highlight-textbox{% endif %}"
|
|
|
|
|
id="{{ name }}" name="{{ name }}"
|
|
|
|
|
cols="30" rows="10"
|
|
|
|
|
{% if highlight_tags %}data-module='highlight-tags'{% endif %}
|
|
|
|
|
>{{ value }}</textarea>
|
2015-12-20 00:00:01 +00:00
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
{% endmacro %}
|