mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
Fix an undefined variable
(imported from commit ed2432b4414617e97d61c84c9636e771e9c05b81)
This commit is contained in:
@@ -68,6 +68,10 @@ function compose_error(error_text, bad_input) {
|
|||||||
bad_input.focus().select();
|
bad_input.focus().select();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function submit_buttons() {
|
||||||
|
return $('#class-message, #personal-message').find('input[type="submit"]');
|
||||||
|
}
|
||||||
|
|
||||||
// *Synchronously* check if a class exists.
|
// *Synchronously* check if a class exists.
|
||||||
// If not, displays an error and returns false.
|
// If not, displays an error and returns false.
|
||||||
function check_class_for_send(class_name) {
|
function check_class_for_send(class_name) {
|
||||||
@@ -84,7 +88,7 @@ function check_class_for_send(class_name) {
|
|||||||
$('#class-dne-name').text(class_name);
|
$('#class-dne-name').text(class_name);
|
||||||
$('#class-dne').show();
|
$('#class-dne').show();
|
||||||
$('#create-it').focus();
|
$('#create-it').focus();
|
||||||
buttons.removeAttr('disabled');
|
submit_buttons().removeAttr('disabled');
|
||||||
hide_compose();
|
hide_compose();
|
||||||
}
|
}
|
||||||
$("#home-error").hide();
|
$("#home-error").hide();
|
||||||
@@ -93,7 +97,7 @@ function check_class_for_send(class_name) {
|
|||||||
okay = false;
|
okay = false;
|
||||||
report_error("Error checking subscription", xhr, $("#home-error"));
|
report_error("Error checking subscription", xhr, $("#home-error"));
|
||||||
$("#class").focus();
|
$("#class").focus();
|
||||||
buttons.removeAttr('disabled');
|
submit_buttons().removeAttr('disabled');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return okay;
|
return okay;
|
||||||
|
|||||||
Reference in New Issue
Block a user