mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 01:55:41 -04:00
Allow elaboration when ‘something else’ is chosen
Letting people input a bit of free text should reduce the amount of back and forth we have to do over support tickets when setting up someone’s branding. If something else is the only option then we don’t show the radio button at all and have just the free text input on the page (not behind a progressive disclosure).
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/radios.html" import radios %}
|
||||
{% from "components/radios.html" import radio, conditional_radio_panel %}
|
||||
{% from "components/select-input.html" import select_wrapper %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
@@ -17,7 +18,26 @@
|
||||
) }}
|
||||
|
||||
{% call form_wrapper() %}
|
||||
{{ radios(form.options) }}
|
||||
{% if form.something_else_is_only_option %}
|
||||
{{ textbox(
|
||||
form.something_else,
|
||||
hint='Include links to your brand guidelines or examples of how to use your branding',
|
||||
width='1-1',
|
||||
) }}
|
||||
{% else %}
|
||||
{% call select_wrapper(form.options) %}
|
||||
{% for option in form.options %}
|
||||
{{ radio(option, data_target='panel-something-else' if option.data == form.FALLBACK_OPTION_VALUE else '') }}
|
||||
{% endfor %}
|
||||
{% endcall %}
|
||||
{% call conditional_radio_panel('panel-something-else') %}
|
||||
{{ textbox(
|
||||
form.something_else,
|
||||
hint='Include links to your brand guidelines or examples of how to use your branding',
|
||||
width='1-1',
|
||||
) }}
|
||||
{% endcall %}
|
||||
{% endif %}
|
||||
<p class="form-group">
|
||||
We’ll email you once your branding’s ready to use, or if we need any
|
||||
more information.
|
||||
|
||||
Reference in New Issue
Block a user