mirror of
https://github.com/simple-login/app.git
synced 2024-09-27 20:31:30 +02:00
fix cancel button in authorization page when user is not login
This commit is contained in:
parent
232d250186
commit
4c34775aa2
@ -17,7 +17,7 @@
|
||||
</ul>
|
||||
|
||||
<label>
|
||||
In order to accept the request, you need to login or sign up.
|
||||
In order to accept the request, you need to sign in.
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@ -37,9 +37,11 @@
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
<a class="btn btn-block btn-secondary" href="javascript:history.back()">
|
||||
<p class="text-center col">Cancel and go back to <b>{{ client.name }}</b></p>
|
||||
<a class="btn btn-block btn-secondary back-or-close">
|
||||
<i class="fe fe-arrow-left mr-2"></i>Cancel
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
@ -129,6 +129,16 @@
|
||||
e.clearSelection();
|
||||
});
|
||||
|
||||
// Handle back or close button
|
||||
$('.back-or-close').on("click", function () {
|
||||
// the window is actually a popup, in this case just close it
|
||||
if (history.length == 1) {
|
||||
window.close();
|
||||
} else {
|
||||
history.back();
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<!-- For additional script -->
|
||||
|
@ -55,7 +55,7 @@ def test_authorize_page_non_login_user(flask_client):
|
||||
|
||||
html = r.get_data(as_text=True)
|
||||
assert r.status_code == 200
|
||||
assert "In order to accept the request, you need to login or sign up" in html
|
||||
assert "In order to accept the request, you need to sign in" in html
|
||||
|
||||
|
||||
def test_authorize_page_login_user_non_supported_flow(flask_client):
|
||||
|
Loading…
Reference in New Issue
Block a user