mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
admin: Add No-change-made message.
A 'no changes made' message is displayed whenever save-changes button is clicked, albeit no changes are made in the admin page.
This commit is contained in:
committed by
Tim Abbott
parent
06cd40d461
commit
fc965eb5f6
@@ -657,6 +657,16 @@ function _setup_page() {
|
||||
ui.report_success(i18n.t("waiting period threshold changed!"), waiting_period_threshold_status);
|
||||
}
|
||||
}
|
||||
// Check if no changes made
|
||||
var no_changes_made = true;
|
||||
for (var key in response_data) {
|
||||
if (['msg', 'result'].indexOf(key) < 0) {
|
||||
no_changes_made = false;
|
||||
}
|
||||
}
|
||||
if (no_changes_made) {
|
||||
ui.report_success(i18n.t("No changes to save!"), name_status);
|
||||
}
|
||||
},
|
||||
error: function (xhr) {
|
||||
var reason = $.parseJSON(xhr.responseText).reason;
|
||||
|
||||
Reference in New Issue
Block a user