fix: redirect to /login if logged out from apps page
This commit is contained in:
parent
9ea66f6aca
commit
0d6ecfbd22
1 changed files with 10 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ endblock -%} {%- block footer -%} {%- endblock -%} {% block content %}
|
|||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<a href="/api/method/web_logout" class="logout-btn btn btn-default">
|
||||
<button class="logout-btn btn btn-default">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
|
|
@ -44,7 +44,7 @@ endblock -%} {%- block footer -%} {%- endblock -%} {% block content %}
|
|||
<line x1="21" x2="9" y1="12" y2="12" />
|
||||
</svg>
|
||||
<span> {{ _('Logout') }} </span>
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
@ -62,5 +62,13 @@ endblock -%} {%- block footer -%} {%- endblock -%} {% block content %}
|
|||
}
|
||||
});
|
||||
});
|
||||
$('.logout-btn').on('click', function() {
|
||||
frappe.call({
|
||||
method: 'logout',
|
||||
callback: function() {
|
||||
window.location.href = '/login';
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue