This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Convert additional templates to Jinja #8444
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f670a75
Convert recaptcha to a Jinja template.
clokep d8491ad
Convert terms to a Jinja template.
clokep f6a0266
Convert success to a Jinja template.
clokep 472324b
Don't require public_baseurl to be set.
clokep 17255e4
Add a changelog.
clokep File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Convert additional templates from inline HTML to Jinja2 templates. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<html> | ||
<head> | ||
<title>Success!</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="/_matrix/static/client/register/style.css"> | ||
<script> | ||
if (window.onAuthDone) { | ||
window.onAuthDone(); | ||
} else if (window.opener && window.opener.postMessage) { | ||
window.opener.postMessage("authDone", "*"); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<div> | ||
<p>Thank you</p> | ||
<p>You may now close this window and return to the application</p> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<html> | ||
<head> | ||
<title>Authentication</title> | ||
<meta name='viewport' content='width=device-width, initial-scale=1, | ||
user-scalable=no, minimum-scale=1.0, maximum-scale=1.0'> | ||
<script src="https://www.recaptcha.net/recaptcha/api.js" | ||
async defer></script> | ||
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script> | ||
<link rel="stylesheet" href="/_matrix/static/client/register/style.css"> | ||
<script> | ||
function captchaDone() { | ||
$('#registrationForm').submit(); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<form id="registrationForm" method="post" action="{{ myurl }}"> | ||
<div> | ||
<p> | ||
Hello! We need to prevent computer programs and other automated | ||
things from creating accounts on this server. | ||
</p> | ||
<p> | ||
Please verify that you're not a robot. | ||
</p> | ||
<input type="hidden" name="session" value="{{ session }}" /> | ||
<div class="g-recaptcha" | ||
data-sitekey="{{ sitekey }}" | ||
data-callback="captchaDone"> | ||
</div> | ||
<noscript> | ||
<input type="submit" value="All Done" /> | ||
</noscript> | ||
</div> | ||
</div> | ||
</form> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<html> | ||
<head> | ||
<title>Authentication</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="/_matrix/static/client/register/style.css"> | ||
</head> | ||
<body> | ||
<form id="registrationForm" method="post" action="{{ myurl }}"> | ||
<div> | ||
<p> | ||
Please click the button below if you agree to the | ||
<a href="{{ terms_url }}">privacy policy of this homeserver.</a> | ||
</p> | ||
<input type="hidden" name="session" value="{{ session }}" /> | ||
<input type="submit" value="Agree" /> | ||
</div> | ||
</form> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the conversation in #synapse-dev:matrix.org it seems that
public_baseurl
is not required to be set. I believe any feature that expects to use this template filter already asserts that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems so!