-
-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change nav item logout link from get link to post button #691
change nav item logout link from get link to post button #691
Conversation
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.
Thanks for your patch! Indeed, the logout link should be a POST link. However, as the template is bootstrap-style, could you please avoid direct "style=" and replace the styles by matching bootstrap classes (like d-inline
, etc.)?
class="nav-link btn btn-link p-2 m-0 text-decoration-none"
Hi, I fixed it. I visually confirmed that the nav-link works correctly in both expanded and collapsed states. |
example/templates/_base.html
Outdated
@@ -41,7 +41,12 @@ | |||
<li class="nav-item {% block nav_sessions %}{% endblock %}"> | |||
<a class="nav-link" href="{% url 'user_sessions:session_list' %}">{% trans "Sessions" %}</a></li> | |||
<li class="nav-item"> | |||
<a class="nav-link" href="{% url 'logout' %}">{% trans "Logout" %}</a> | |||
<form action="{% url 'logout' %}" method="post" style="display: inline;"> |
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.
This one should still be converted to d-inline
class, please.
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.
Thanks, looks good now!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #691 +/- ##
=======================================
Coverage 95.52% 95.52%
=======================================
Files 78 78
Lines 3354 3354
Branches 377 377
=======================================
Hits 3204 3204
Misses 119 119
Partials 31 31 ☔ View full report in Codecov by Sentry. |
As this is the first time tring to contribute OSS, sorry in advance if any of my procedures are not appropriate.
navbar logout link changed to post form.
Description
example/templates/_base.html fixed to:
Motivation and Context
original link below causes 405 response.
<a class="nav-link" href="{% url 'logout' %}">{% trans "Logout" %}</a>
How Has This Been Tested?
the test below actually ends with some errors but not differ from origin/master's result.
Screenshots (if appropriate):
Types of changes
Checklist: