Simplify template picker to be just radio buttons

Includes making the selection buttons work properly
This commit is contained in:
Chris Hill-Scott
2016-01-13 17:42:01 +00:00
parent 13bb1ec5ee
commit 2554fbe0e0
3 changed files with 27 additions and 27 deletions

View File

@@ -1 +1,3 @@
$(() => GOVUK.modules.start()); $(() => GOVUK.modules.start());
$(() => new GOVUK.SelectionButtons('.block-label input'));

View File

@@ -10,38 +10,35 @@
{% block maincolumn_content %} {% block maincolumn_content %}
<form method="POST" enctype="multipart/form-data"> <form method="POST" enctype="multipart/form-data">
<h1 class="heading-xlarge">Send text messages</h1> <h1 class="heading-xlarge">Send text messages</h1>
<h2 class="heading-medium">1. Choose text message template</h2> <fieldset class='form-group'>
{% for template in message_templates %} <legend class="heading-medium">1. Choose text message template</legend>
<div class="template-picker-option"> {% for template in message_templates %}
<div class="template-picker-option-radio"> <label class="block-label" for="template-{{loop.index}}">
<label class="block-label" for="template-{{loop.index}}"> {{ template.name }}
{{ template.name }} <input type="radio" name="template" id="template-{{loop.index}}" value="{{ template.name }}" />
<input type="radio" name="template" id="template-{{loop.index}}" value="{{ template.name }}" /> </label>
</label> {% endfor %}
</div> </fieldset>
{{ sms_message(template.body) }}
</div>
{% endfor %}
<p> <p>
or <a href="{{ url_for(".add_template", service_id=service_id) }}">create a new template</a> or <a href="{{ url_for(".add_template", service_id=service_id) }}">create a new template</a>
</p> </p>
<h2 class="heading-medium">2. Add recipients</h2> <h2 class="heading-medium">2. Add recipients</h2>
<p> <p>
Upload a CSV file to add your recipients details. Upload a CSV file to add your recipients details.
</p> </p>
<p> <p>
You can also <a href="#">download an example CSV</a>. You can also <a href="#">download an example CSV</a>.
</p> </p>
<p> <p>
{{textbox(form.file)}} {{textbox(form.file)}}
</p> </p>
{{ page_footer("Continue") }} {{ page_footer("Continue") }}
</form> </form>

View File

@@ -32,6 +32,7 @@ gulp.task('copy:govuk_template:assets', () => gulp.src('bower_components/govuk_t
gulp.task('javascripts', () => gulp gulp.task('javascripts', () => gulp
.src([ .src([
paths.src + 'govuk_frontend_toolkit/javascripts/govuk/modules.js', paths.src + 'govuk_frontend_toolkit/javascripts/govuk/modules.js',
paths.src + 'govuk_frontend_toolkit/javascripts/govuk/selection-buttons.js',
paths.src + 'javascripts/highlightTags.js', paths.src + 'javascripts/highlightTags.js',
paths.src + 'javascripts/dropdown.js', paths.src + 'javascripts/dropdown.js',
paths.src + 'javascripts/main.js' paths.src + 'javascripts/main.js'