mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-23 08:49:46 -04:00
Lowercase value of 'show-now-as-default'
To match the boolean value in JavaScript.
This commit is contained in:
committed by
Chris Hill-Scott
parent
e45bbcf99e
commit
b5360c14cc
@@ -87,7 +87,7 @@
|
||||
let name = $component.find('input').eq(0).attr('name');
|
||||
let mousedownOption = null;
|
||||
let showNowAsDefault = (
|
||||
$component.data('show-now-as-default').toLowerCase() === 'true' ?
|
||||
$component.data('show-now-as-default').toString() === 'true' ?
|
||||
{'name': name} : false
|
||||
);
|
||||
const reset = () => {
|
||||
@@ -131,7 +131,8 @@
|
||||
'choices': choices.filter(
|
||||
element => element.label.toLowerCase().indexOf(day) > -1
|
||||
),
|
||||
'name': name
|
||||
'name': name,
|
||||
'showNowAsDefault': showNowAsDefault
|
||||
});
|
||||
focusSelected(component);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</span>
|
||||
{% endif %}
|
||||
</legend>
|
||||
<div class="radio-select" data-module="radio-select" data-categories="{{ field.categories|join(',') }}" data-show-now-as-default="{{ show_now_as_default }}">
|
||||
<div class="radio-select" data-module="radio-select" data-categories="{{ field.categories|join(',') }}" data-show-now-as-default="{{ show_now_as_default|string|lower }}">
|
||||
<div class="radio-select-column">
|
||||
{% for option in field %}
|
||||
<div class="multiple-choice">
|
||||
|
||||
@@ -100,7 +100,7 @@ describe('RadioSelect', () => {
|
||||
<legend class="form-label">
|
||||
When should Notify send these messages?
|
||||
</legend>
|
||||
<div class="radio-select" data-module="radio-select" data-categories="${CATEGORIES.join(',')}" data-show-now-as-default="True">
|
||||
<div class="radio-select" data-module="radio-select" data-categories="${CATEGORIES.join(',')}" data-show-now-as-default="true">
|
||||
<div class="radio-select__column">
|
||||
<div class="multiple-choice">
|
||||
<input checked="" id="scheduled_for-0" name="scheduled_for" type="radio" value="">
|
||||
|
||||
Reference in New Issue
Block a user