mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-11 22:14:06 -05:00
* Consolidating code ql findings * Added ref files for backstop to set baseline for removing custom js file * Potential fix for code scanning alert no. 32: URL redirection from remote source Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Removed unused large file * Fixed import order --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
29 lines
617 B
JavaScript
29 lines
617 B
JavaScript
(function(global) {
|
|
|
|
"use strict";
|
|
|
|
global.GOVUK.Modules.RadioSlider = function() {
|
|
|
|
this.start = function(component) {
|
|
|
|
$(component)
|
|
.on('click', function() {
|
|
|
|
valuesInLabel = $(this).find(':checked').next('label').text().split('/');
|
|
|
|
if (valuesInLabel.length === 2) {
|
|
leftValue = valuesInLabel[0];
|
|
rightValue = valuesInLabel[1];
|
|
$(this).find('.radio-slider-left-value').text(leftValue);
|
|
$(this).find('.radio-slider-right-value').text(rightValue);
|
|
}
|
|
|
|
})
|
|
.trigger('click');
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})(window);
|