[fix] save last route on error so user logs in to the correct page, fixes frappe/erpnext#8174
This commit is contained in:
parent
df66dfe941
commit
f0f16ff815
1 changed files with 20 additions and 14 deletions
|
|
@ -3,7 +3,19 @@
|
|||
{% block title %}{{ title or _("Message") }}{% endblock %}
|
||||
|
||||
{% block page_content %}
|
||||
|
||||
<style>
|
||||
.hero-and-content {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
{% if fullpage %}
|
||||
header, footer {
|
||||
display: none;
|
||||
}
|
||||
html, body {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
{% endif %}
|
||||
</style>
|
||||
<div class='page-card'>
|
||||
<div class='page-card-head'>
|
||||
<span class='indicator {{ indicator_color or "blue" }}'>
|
||||
|
|
@ -18,17 +30,11 @@
|
|||
{% if error_code %}
|
||||
<p class='text-muted text-center small' style='margin-top: -20px;'>{{ _("Status: {0}").format(error_code) }}</p>
|
||||
{% endif %}
|
||||
<style>
|
||||
.hero-and-content {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
{% if fullpage %}
|
||||
header, footer {
|
||||
display: none;
|
||||
}
|
||||
html, body {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
{% endif %}
|
||||
</style>
|
||||
<script>
|
||||
frappe.ready(function() {
|
||||
if(window.location.hash) {
|
||||
localStorage.setItem('session_last_route', window.location.hash.substr(1));
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue