mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
settings: Add support for adding/removing custom profile fields.
Now that we have support for displaying custom profile fields, this adds administrator-level support for creating them. Tweaked by tabbott to fix a few small bugs and clean up the commit message. Fixes #1760.
This commit is contained in:
@@ -35,6 +35,9 @@ exports.load_admin_section = function (name) {
|
||||
case 'user-groups-admin':
|
||||
section = 'user-groups';
|
||||
break;
|
||||
case 'profile-field-settings':
|
||||
section = 'profile-fields';
|
||||
break;
|
||||
default:
|
||||
blueslip.error('Unknown admin id ' + name);
|
||||
return;
|
||||
@@ -68,6 +71,9 @@ exports.load_admin_section = function (name) {
|
||||
case 'user-groups':
|
||||
settings_user_groups.set_up();
|
||||
break;
|
||||
case 'profile-fields':
|
||||
settings_profile_fields.set_up();
|
||||
break;
|
||||
default:
|
||||
blueslip.error('programming error for section ' + section);
|
||||
return;
|
||||
@@ -85,6 +91,7 @@ exports.reset_sections = function () {
|
||||
settings_filters.reset();
|
||||
settings_invites.reset();
|
||||
settings_user_groups.reset();
|
||||
settings_profile_fields.reset();
|
||||
};
|
||||
|
||||
return exports;
|
||||
|
||||
Reference in New Issue
Block a user