mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user