aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2016-10-19 17:46:54 +0100
committerDave Arter <davea@mysociety.org>2016-10-28 11:04:05 +0100
commit0a9c2ea426e8477ad302582e41756730965ea8c8 (patch)
treee29797d61b9c9f3264d4db04c883716d2c056827 /web/js
parentbbfb600725bf6fb846291ad4f09a0451fe5cb397 (diff)
Add UI for assigning categories to a user in admin
- A user can be assigned to any number of its body's categories - The category ids are stored as a list in the user's extra field
Diffstat (limited to 'web/js')
-rw-r--r--web/js/fixmystreet-admin.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/js/fixmystreet-admin.js b/web/js/fixmystreet-admin.js
index 0323b1742..884ad1c09 100644
--- a/web/js/fixmystreet-admin.js
+++ b/web/js/fixmystreet-admin.js
@@ -84,10 +84,11 @@ $(function(){
}
});
- // On user edit page, hide the area select field if body changes
+ // On user edit page, hide the area/categories fields if body changes
$("form#user_edit select#body").change(function() {
var show_area = $(this).val() == $(this).find("[data-originally-selected]").val();
$("form#user_edit select#area_id").closest("li").toggle(show_area);
+ $("form#user_edit .js-user-categories").toggle(show_area);
});
// On category edit page, hide the reputation input if inspection isn't required