Hide and show negative case reasons 'other' field appropriately, closes #44

This commit is contained in:
Anna Sidwell 2018-04-15 22:10:05 +10:00
parent 935a2d7d59
commit c8d74a8351
2 changed files with 11 additions and 0 deletions

View File

@ -211,6 +211,13 @@ class CaseStudy(models.Model):
etc')),
('ALAB', _('Abusive labour practices')),
('CRUP', _('Corruption and/or irregular permitting or contracting, conflicts of interest etc')),
#
# N.B.
# If you add another field in here, you need to edit conditionalCheckboxes
# in templates/map/form.html and increment the check for the 'other' field there.
# If you don't, the 'other' detail entry won't show and hide at the appropriate
# times.
#
('OTHR', NEGATIVE_CASE_REASONS_OTHER_TEXT)
)

View File

@ -190,6 +190,10 @@
{
"checkbox": "#id_shown_on_other_platforms",
"showHide": "#div_id_shown_on_other_platforms_detail"
},
{
"checkbox": "#id_negative_case_reasons_8",
"showHide": "#div_id_negative_case_reasons_other"
}
];