Allow rows to be passed to textbox

HTML textboxes have a rows attribute, which controls their height,
unless their height is overridden by CSS.
This commit is contained in:
Chris Hill-Scott
2016-04-14 14:00:49 +01:00
parent c465c0404b
commit 150aef2868
2 changed files with 5 additions and 5 deletions

View File

@@ -8,7 +8,8 @@
width='2-3',
suffix=None,
disabled=False,
safe_error_message=False
safe_error_message=False,
rows=8
) %}
<div class="form-group{% if field.errors %} error{% endif %}" {% if autofocus %}data-module="autofocus"{% endif %}>
<label class="form-label" for="{{ field.name }}">
@@ -34,11 +35,10 @@
{% else %}
{{ field(**{
'class': 'form-control form-control-{} textbox-highlight-textbox'.format(width) if highlight_tags else 'form-control form-control-{} {}'.format(width, 'textbox-right-aligned' if suffix else ''),
'data-module': 'highlight-tags' if highlight_tags else ''
'data-module': 'highlight-tags' if highlight_tags else '',
'rows': rows|string
}) }}
{% endif %}
{% if suffix %}
<span>{{ suffix }}</span>
{% endif %}