mirror of https://github.com/zulip/zulip.git
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:
parent
440975e369
commit
2e8cf6984e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue