diff --git a/app/assets/javascripts/radioSelect.js b/app/assets/javascripts/radioSelect.js index 6edfd5392..fbd4175b9 100644 --- a/app/assets/javascripts/radioSelect.js +++ b/app/assets/javascripts/radioSelect.js @@ -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); diff --git a/app/templates/components/radios.html b/app/templates/components/radios.html index eb55217b0..477f0135c 100644 --- a/app/templates/components/radios.html +++ b/app/templates/components/radios.html @@ -36,7 +36,7 @@ {% endif %} -
+
{% for option in field %}
diff --git a/tests/javascripts/radioSelect.test.js b/tests/javascripts/radioSelect.test.js index abd307672..dd7811b97 100644 --- a/tests/javascripts/radioSelect.test.js +++ b/tests/javascripts/radioSelect.test.js @@ -100,7 +100,7 @@ describe('RadioSelect', () => { When should Notify send these messages? -
+