mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(FastAPI): use elif statements where appropriate
Signed-off-by: Steven Guikal <void@fluix.one>
This commit is contained in:
parent
927f5e8567
commit
db67e83bb8
3 changed files with 16 additions and 23 deletions
|
@ -16,17 +16,16 @@
|
|||
| safe
|
||||
}}
|
||||
</p>
|
||||
{% elif request.user.is_authenticated() %}
|
||||
<p>
|
||||
{{ "Logged-in as: %s"
|
||||
| tr
|
||||
| format("<b>%s</b>" | format(request.user.Username))
|
||||
| safe
|
||||
}}
|
||||
<a href="/logout/?next={{ next }}">[{% trans %}Logout{% endtrans %}]</a>
|
||||
</p>
|
||||
{% else %}
|
||||
{% if request.user.is_authenticated() %}
|
||||
<p>
|
||||
{{ "Logged-in as: %s"
|
||||
| tr
|
||||
| format("<b>%s</b>" | format(request.user.Username))
|
||||
| safe
|
||||
}}
|
||||
<a href="/logout/?next={{ next }}">[{% trans %}Logout{% endtrans %}]</a>
|
||||
</p>
|
||||
{% else %}
|
||||
<form method="post" action="/login?next={{ next }}">
|
||||
<fieldset>
|
||||
<legend>{% trans %}Enter login credentials{% endtrans %}</legend>
|
||||
|
@ -81,9 +80,7 @@
|
|||
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue