Switch NullBooleanFields to BooleanFields, add conditional display of last question

This commit is contained in:
2018-03-26 13:42:14 +11:00
parent 1a84499eb6
commit a4281edc4a
3 changed files with 49 additions and 12 deletions

View File

@ -103,10 +103,16 @@
// Here we define the checkboxes that we need to use to
// conditionally toggle fields - they use slightly different
// logic as they rely on the 'checked' attribute rather than value.
var conditionalCheckboxes = [{
"checkbox": "#id_affects_indigenous",
"showHide": "#div_id_affects_indigenous_detail"
}];
var conditionalCheckboxes = [
{
"checkbox": "#id_affects_indigenous",
"showHide": "#div_id_affects_indigenous_detail"
},
{
"checkbox": "#id_shown_on_other_platforms",
"showHide": "#div_id_shown_on_other_platforms_detail"
}
];
// Define a function that hides the field and then creates a listener to toggle the field.
// Takes a single conditionalField dictionary with (field, showHide and condition).