settings: Disable submit button when no input is changed.

We now disable the submit button if no input is changed
in modals used for editing name and descriptions of
stream and user groups. The button is enabled if any
value is changed.
This commit is contained in:
Sahil Batra
2023-09-20 12:14:27 +05:30
committed by Tim Abbott
parent a37c91e5f9
commit 00424748f4
4 changed files with 6 additions and 11 deletions

View File

@@ -454,6 +454,7 @@ export function initialize() {
.addClass("save-button")
.attr("data-stream-id", stream_id);
},
update_submit_disabled_state_on_change: true,
});
});
@@ -504,10 +505,6 @@ export function initialize() {
const new_name = $("#change_stream_name").val().trim();
const new_description = $("#change_stream_description").val().trim();
if (new_name === sub.name && new_description === sub.description) {
dialog_widget.hide_dialog_spinner();
return;
}
if (new_name !== sub.name) {
data.new_name = new_name;
}