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:
Umair Khan
2017-12-14 09:51:45 +05:00
committed by Tim Abbott
parent 7885dd4408
commit c14cefc24c
15 changed files with 386 additions and 0 deletions

View File

@@ -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;