Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Upgrade jQuery to 3.x on fallback login/registration screens (#7236)
Browse files Browse the repository at this point in the history
  • Loading branch information
anoadragon453 authored Apr 9, 2020
1 parent 24722de commit 55d46da
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 16 deletions.
1 change: 1 addition & 0 deletions changelog.d/7236.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade jQuery to v3.4.1 on fallback login/registration pages.
3 changes: 2 additions & 1 deletion synapse/static/client/login/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<!doctype html>
<html>
<head>
<title> Login </title>
<meta name='viewport' content='width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0'>
<link rel="stylesheet" href="style.css">
<script src="js/jquery-2.1.3.min.js"></script>
<script src="js/jquery-3.4.1.min.js"></script>
<script src="js/login.js"></script>
</head>
<body onload="matrixLogin.onLoad()">
Expand Down
4 changes: 0 additions & 4 deletions synapse/static/client/login/js/jquery-2.1.3.min.js

This file was deleted.

2 changes: 2 additions & 0 deletions synapse/static/client/login/js/jquery-3.4.1.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions synapse/static/client/login/js/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var submitPassword = function(user, pwd) {
};
$.post(matrixLogin.endpoint, JSON.stringify(data), function(response) {
matrixLogin.onLogin(response);
}).error(errorFunc);
}).fail(errorFunc);
};

var submitToken = function(loginToken) {
Expand All @@ -29,7 +29,7 @@ var submitToken = function(loginToken) {
};
$.post(matrixLogin.endpoint, JSON.stringify(data), function(response) {
matrixLogin.onLogin(response);
}).error(errorFunc);
}).fail(errorFunc);
};

var errorFunc = function(err) {
Expand Down Expand Up @@ -105,7 +105,7 @@ var fetch_info = function(cb) {
}

cb();
}).error(errorFunc);
}).fail(errorFunc);
}

matrixLogin.onLoad = function() {
Expand Down
3 changes: 2 additions & 1 deletion synapse/static/client/register/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<!doctype html>
<html>
<head>
<title> Registration </title>
<meta name='viewport' content='width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0'>
<link rel="stylesheet" href="style.css">
<script src="js/jquery-2.1.3.min.js"></script>
<script src="js/jquery-3.4.1.min.js"></script>
<script src="https://www.recaptcha.net/recaptcha/api/js/recaptcha_ajax.js"></script>
<script src="register_config.js"></script>
<script src="js/register.js"></script>
Expand Down
4 changes: 0 additions & 4 deletions synapse/static/client/register/js/jquery-2.1.3.min.js

This file was deleted.

2 changes: 2 additions & 0 deletions synapse/static/client/register/js/jquery-3.4.1.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions synapse/static/client/register/js/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var setupCaptcha = function() {
callback: Recaptcha.focus_response_field
});
window.matrixRegistration.isUsingRecaptcha = true;
}).error(errorFunc);
}).fail(errorFunc);

};

Expand All @@ -49,7 +49,7 @@ var submitCaptcha = function(user, pwd) {
$.post(matrixRegistration.endpoint, JSON.stringify(data), function(response) {
console.log("Success -> "+JSON.stringify(response));
submitPassword(user, pwd, response.session);
}).error(function(err) {
}).fail(function(err) {
Recaptcha.reload();
errorFunc(err);
});
Expand All @@ -67,7 +67,7 @@ var submitPassword = function(user, pwd, session) {
matrixRegistration.onRegistered(
response.home_server, response.user_id, response.access_token
);
}).error(errorFunc);
}).fail(errorFunc);
};

var errorFunc = function(err) {
Expand Down

0 comments on commit 55d46da

Please sign in to comment.