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());
$(() => new GOVUK.SelectionButtons('.block-label input'));

View File

@@ -12,18 +12,15 @@
<h1 class="heading-xlarge">Send text messages</h1>
<h2 class="heading-medium">1. Choose text message template</h2>
<fieldset class='form-group'>
<legend class="heading-medium">1. Choose text message template</legend>
{% for template in message_templates %}
<div class="template-picker-option">
<div class="template-picker-option-radio">
<label class="block-label" for="template-{{loop.index}}">
{{ template.name }}
<input type="radio" name="template" id="template-{{loop.index}}" value="{{ template.name }}" />
</label>
</div>
{{ sms_message(template.body) }}
</div>
{% endfor %}
</fieldset>
<p>
or <a href="{{ url_for(".add_template", service_id=service_id) }}">create a new template</a>

View File

@@ -32,6 +32,7 @@ gulp.task('copy:govuk_template:assets', () => gulp.src('bower_components/govuk_t
gulp.task('javascripts', () => gulp
.src([
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/dropdown.js',
paths.src + 'javascripts/main.js'