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

Commit 55d46da

Browse files
Upgrade jQuery to 3.x on fallback login/registration screens (#7236)
1 parent 24722de commit 55d46da

9 files changed

Lines changed: 15 additions & 16 deletions

File tree

changelog.d/7236.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade jQuery to v3.4.1 on fallback login/registration pages.

synapse/static/client/login/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
<!doctype html>
12
<html>
23
<head>
34
<title> Login </title>
45
<meta name='viewport' content='width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0'>
56
<link rel="stylesheet" href="style.css">
6-
<script src="js/jquery-2.1.3.min.js"></script>
7+
<script src="js/jquery-3.4.1.min.js"></script>
78
<script src="js/login.js"></script>
89
</head>
910
<body onload="matrixLogin.onLoad()">

synapse/static/client/login/js/jquery-2.1.3.min.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

synapse/static/client/login/js/jquery-3.4.1.min.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

synapse/static/client/login/js/login.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var submitPassword = function(user, pwd) {
1717
};
1818
$.post(matrixLogin.endpoint, JSON.stringify(data), function(response) {
1919
matrixLogin.onLogin(response);
20-
}).error(errorFunc);
20+
}).fail(errorFunc);
2121
};
2222

2323
var submitToken = function(loginToken) {
@@ -29,7 +29,7 @@ var submitToken = function(loginToken) {
2929
};
3030
$.post(matrixLogin.endpoint, JSON.stringify(data), function(response) {
3131
matrixLogin.onLogin(response);
32-
}).error(errorFunc);
32+
}).fail(errorFunc);
3333
};
3434

3535
var errorFunc = function(err) {
@@ -105,7 +105,7 @@ var fetch_info = function(cb) {
105105
}
106106

107107
cb();
108-
}).error(errorFunc);
108+
}).fail(errorFunc);
109109
}
110110

111111
matrixLogin.onLoad = function() {

synapse/static/client/register/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
<!doctype html>
12
<html>
23
<head>
34
<title> Registration </title>
45
<meta name='viewport' content='width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0'>
56
<link rel="stylesheet" href="style.css">
6-
<script src="js/jquery-2.1.3.min.js"></script>
7+
<script src="js/jquery-3.4.1.min.js"></script>
78
<script src="https://www.recaptcha.net/recaptcha/api/js/recaptcha_ajax.js"></script>
89
<script src="register_config.js"></script>
910
<script src="js/register.js"></script>

synapse/static/client/register/js/jquery-2.1.3.min.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

synapse/static/client/register/js/jquery-3.4.1.min.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

synapse/static/client/register/js/register.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var setupCaptcha = function() {
3333
callback: Recaptcha.focus_response_field
3434
});
3535
window.matrixRegistration.isUsingRecaptcha = true;
36-
}).error(errorFunc);
36+
}).fail(errorFunc);
3737

3838
};
3939

@@ -49,7 +49,7 @@ var submitCaptcha = function(user, pwd) {
4949
$.post(matrixRegistration.endpoint, JSON.stringify(data), function(response) {
5050
console.log("Success -> "+JSON.stringify(response));
5151
submitPassword(user, pwd, response.session);
52-
}).error(function(err) {
52+
}).fail(function(err) {
5353
Recaptcha.reload();
5454
errorFunc(err);
5555
});
@@ -67,7 +67,7 @@ var submitPassword = function(user, pwd, session) {
6767
matrixRegistration.onRegistered(
6868
response.home_server, response.user_id, response.access_token
6969
);
70-
}).error(errorFunc);
70+
}).fail(errorFunc);
7171
};
7272

7373
var errorFunc = function(err) {

0 commit comments

Comments
 (0)