ajax: Fix wrong ajax setting name from beforeSubmit to beforeSend.

The beforeSubmit function was a feature of the jquery-form plugin that
we removed months ago; the appropriate similar feature of jQuery's
built-in AJAX library is beforeSend.
This commit is contained in:
Shubham Dhama
2019-02-02 12:20:26 +05:30
committed by Tim Abbott
parent f34a5d6828
commit dee4e3fb89
2 changed files with 2 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ function submit_invitation_form() {
channel.post({
url: "/json/invites",
data: data,
beforeSubmit: function () {
beforeSend: function () {
reset_error_messages();
// TODO: You could alternatively parse the textarea here, and return errors to
// the user if they don't match certain constraints (i.e. not real email addresses,

View File

@@ -329,7 +329,7 @@ exports.set_up = function () {
channel.patch({
url: "/json/settings",
data: data,
beforeSubmit: function () {
beforeSend: function () {
if (page_params.realm_password_auth_enabled !== false) {
// FIXME: Check that the two password fields match
// FIXME: Use the same jQuery validation plugin as the signup form?