mirror of
https://github.com/simple-login/app.git
synced 2025-10-21 12:47:07 +08:00
fix cancel button in authorization page when user is not login
This commit is contained in:
parent
232d250186
commit
4c34775aa2
3 changed files with 21 additions and 9 deletions
|
@ -17,7 +17,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<label>
|
<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>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -37,9 +37,11 @@
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div class="row">
|
<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
|
<i class="fe fe-arrow-left mr-2"></i>Cancel
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -129,6 +129,16 @@
|
||||||
e.clearSelection();
|
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>
|
</script>
|
||||||
|
|
||||||
<!-- For additional script -->
|
<!-- For additional script -->
|
||||||
|
|
|
@ -55,7 +55,7 @@ def test_authorize_page_non_login_user(flask_client):
|
||||||
|
|
||||||
html = r.get_data(as_text=True)
|
html = r.get_data(as_text=True)
|
||||||
assert r.status_code == 200
|
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):
|
def test_authorize_page_login_user_non_supported_flow(flask_client):
|
||||||
|
|
Loading…
Add table
Reference in a new issue