diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-01-11 09:47:56 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-01-11 09:47:56 +0000 |
commit | 12e493cd9969b43739e7499212635ae1fa7384e4 (patch) | |
tree | 634a1d9328a5969dd35c66601ee6f370a2a3208e | |
parent | fa019d27d903c30313e6069ec3cb97d8255ee509 (diff) |
Little bit of JS for Zurich DM action selection.
-rw-r--r-- | templates/web/zurich/admin/report_edit.html | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html index 91d776d96..9821ba6b4 100644 --- a/templates/web/zurich/admin/report_edit.html +++ b/templates/web/zurich/admin/report_edit.html @@ -65,7 +65,8 @@ </select></p> <ul> -<li><label for="body_subdivision">[% loc('Assign to subdivision:') %]</label> +<li class="assignation"> +<label for="body_subdivision">[% loc('Assign to subdivision:') %]</label> <select name="body_subdivision" id="body_subdivision"> <option value="">--</option> [% FOR body IN bodies %] @@ -74,7 +75,7 @@ [% END %] </select> -<li> +<li class="assignation"> <label for="category"> [% loc('Category:') %] [% problem.category %]<br> [% loc('Assign to different category:') %]</label> @@ -85,7 +86,8 @@ [% END %] </select></li> -<li><label for="body_external">[% loc('Assign to external body:') %]</label> +<li class="assignation"> +<label for="body_external">[% loc('Assign to external body:') %]</label> <select name="body_external" id="body_external"> <option value="">--</option> [% FOR body IN bodies %] @@ -99,6 +101,20 @@ </ul> +<script type="text/javascript"> +$(function(){ + $('.assignation select').change(function(){ + if (this.value == "") { + $('.assignation').css('color', '#000'); + } else { + var a = $(this).closest('li').css('color', '#000'); + $('.assignation select').not(this).val(""); + $('.assignation').not(a).css('color', '#999'); + } + }); +}); +</script> + [% ELSIF problem.state == 'planned' %] <p>[% loc('State:') %] <select name="state" id="state"> |