user settings: Fix click handler errors on datepicker profile field.

On change value click handlers on user profile fields in user settings
were also initialized on profile fields in org settings -> users
section. In org settings -> users, we do not need on change value
click handlers.
This commit fixes above issue by setting up handlers only on
user settings page.
This commit is contained in:
Yashashvi Dave 2019-07-29 23:57:26 +05:30 committed by Tim Abbott
parent 440975e369
commit 2e8cf6984e
1 changed files with 2 additions and 2 deletions

View File

@ -451,7 +451,7 @@ exports.set_up = function () {
$("#deactivate_self_modal").modal("show");
});
$('#settings_page').on('click', '.custom_user_field .remove_date', function (e) {
$('#account-settings').on('click', '.custom_user_field .remove_date', function (e) {
e.preventDefault();
e.stopPropagation();
var field = $(e.target).closest('.custom_user_field').expectOne();
@ -460,7 +460,7 @@ exports.set_up = function () {
update_user_custom_profile_fields([field_id], channel.del);
});
$('#settings_page').on('change', '.custom_user_field_value', function (e) {
$('#account-settings').on('change', '.custom_user_field_value', function (e) {
var fields = [];
var value = $(this).val();
var field_id = parseInt($(e.target).closest('.custom_user_field').attr("data-field-id"), 10);