mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-07 23:10:41 -04:00
Merge pull request #1247 from alphagov/add-back-to-scheduler
Add a back button to the scheduler
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
<label for="{{id}}">{{label}}</label>
|
||||
</div>
|
||||
{{/choices}}
|
||||
<input type='button' class='js-reset-button js-reset-button-block' value='Back' />
|
||||
</div>
|
||||
`),
|
||||
'chosen': Hogan.compile(`
|
||||
@@ -56,7 +57,7 @@
|
||||
let focusSelected = function() {
|
||||
setTimeout(
|
||||
() => $('[type=radio]:checked').next('label').blur().trigger('focus').addClass('selected'),
|
||||
10
|
||||
50
|
||||
);
|
||||
};
|
||||
|
||||
@@ -67,7 +68,6 @@
|
||||
let $component = $(component);
|
||||
let render = (state, data) => {
|
||||
$component.html(states[state].render(data));
|
||||
new GOVUK.SelectionButtons('.block-label input');
|
||||
};
|
||||
let choices = $('label', $component).toArray().map(function(element) {
|
||||
let $element = $(element);
|
||||
@@ -92,7 +92,7 @@
|
||||
),
|
||||
'name': name
|
||||
});
|
||||
$('.js-option').eq(0).parent('label').trigger('focus');
|
||||
focusSelected();
|
||||
|
||||
})
|
||||
.on('click', '.js-option', function(event) {
|
||||
|
||||
@@ -33,6 +33,13 @@
|
||||
|
||||
}
|
||||
|
||||
.js-reset-button-block {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
padding: 20px 20px $gutter 57px;
|
||||
}
|
||||
|
||||
.js-enabled & {
|
||||
|
||||
overflow: visible;
|
||||
|
||||
Reference in New Issue
Block a user