mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-10 05:14:05 -05:00
This commit: - moves things around a bit on the request to go live page - sticks a textbox in there So when someone click the big green button, we will get a support ticket that looks something like: ``` From Test User <test@user.gov.uk> on behalf of Test Service (6ce466d0-fd6a-11e5-82f5-e0accb9d11a6) --- We’ll send about 1000 text messages in the first month, and then 10,000 text messages per month after that. Usage of our service is about 50% higher in March, at the end of the tax year. ```
47 lines
1.4 KiB
HTML
47 lines
1.4 KiB
HTML
{% macro textbox(
|
|
field,
|
|
label=None,
|
|
hint=False,
|
|
highlight_tags=False,
|
|
autofocus=False,
|
|
help_link=None,
|
|
help_link_text=None,
|
|
width='2-3',
|
|
suffix=None,
|
|
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 }}">
|
|
{% if label %}
|
|
{{ label }}
|
|
{% else %}
|
|
{{ field.label }}
|
|
{% endif %}
|
|
{% if hint %}
|
|
<span class="form-hint">
|
|
{{ hint }}
|
|
</span>
|
|
{% endif %}
|
|
{% if field.errors %}
|
|
<span class="error-message">
|
|
{% if not safe_error_message %}{{ field.errors[0] }}{% else %}{{ field.errors[0]|safe }}{% endif %}
|
|
</span>
|
|
{% endif %}
|
|
</label>
|
|
{{ 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 '',
|
|
'rows': rows|string
|
|
}) }}
|
|
{% if suffix %}
|
|
<span>{{ suffix }}</span>
|
|
{% endif %}
|
|
{% if help_link and help_link_text %}
|
|
<p class="textbox-help-link">
|
|
<a href='{{ help_link }}'>{{ help_link_text }}</a>
|
|
</p>
|
|
{% endif %}
|
|
</div>
|
|
{% endmacro %}
|