mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 00:33:58 -04:00
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:
@@ -8,7 +8,8 @@
|
|||||||
width='2-3',
|
width='2-3',
|
||||||
suffix=None,
|
suffix=None,
|
||||||
disabled=False,
|
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 %}>
|
<div class="form-group{% if field.errors %} error{% endif %}" {% if autofocus %}data-module="autofocus"{% endif %}>
|
||||||
<label class="form-label" for="{{ field.name }}">
|
<label class="form-label" for="{{ field.name }}">
|
||||||
@@ -34,11 +35,10 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
{{ field(**{
|
{{ 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 ''),
|
'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 %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% if suffix %}
|
{% if suffix %}
|
||||||
<span>{{ suffix }}</span>
|
<span>{{ suffix }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
{{ textbox(form.subject, width='1-1') }}
|
{{ textbox(form.subject, width='1-1') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="column-two-thirds">
|
<div class="column-two-thirds">
|
||||||
{{ textbox(form.template_content, highlight_tags=True, width='1-1') }}
|
{{ textbox(form.template_content, highlight_tags=True, width='1-1', rows=8) }}
|
||||||
{{ page_footer(
|
{{ page_footer(
|
||||||
'Save',
|
'Save',
|
||||||
delete_link=url_for('.delete_service_template', service_id=current_service.id, template_id=template_id) if template_id or None,
|
delete_link=url_for('.delete_service_template', service_id=current_service.id, template_id=template_id) if template_id or None,
|
||||||
|
|||||||
Reference in New Issue
Block a user