Replace "usb" icons with "user-key" for WebAuthn buttons; refine button styles and layouts across templates
This commit is contained in:
1
.idea/ClubManager.iml
generated
1
.idea/ClubManager.iml
generated
@@ -14,6 +14,7 @@
|
||||
</component>
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.venv" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="uv (ClubManager) (3)" jdkType="Python SDK" />
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
{# Hardcoded, not `base_template`: the panel is platform-only, and a branding bug
|
||||
must never be able to dress it up as a club. #}
|
||||
{% extends "_platform_base.html" %}
|
||||
{% load lucide %}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
|
||||
<div class="mt-10 flex flex-wrap items-center justify-end gap-2">
|
||||
<a class="btn btn-accent gap-2" href="{% url 'account_reset_password' %}">{% lucide "life-buoy" size=16 %} {% trans "Forgot Password?" %}</a>
|
||||
<a class="btn btn-accent btn-outline gap-2" href="{% url 'account_reset_password' %}">{% lucide "life-buoy" size=16 %} {% trans "Forgot Password?" %}</a>
|
||||
<button class="btn btn-primary gap-2" type="submit">{% lucide "key-round" size=16 %} {% trans "Change Password" %}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
false — silently dropping every field on every form that doesn't pass `exclude`.
|
||||
{% endcomment %}
|
||||
{% with exclude=attrs.exclude|default:"" %}
|
||||
{% for field in attrs.form.visible_fields %}
|
||||
{% for field in attrs.form.visible_fields %}
|
||||
{% if not field|excluded:exclude %}
|
||||
<div class="form-control my-3 w-full">
|
||||
{% if field.field.widget.input_type == "checkbox" %}
|
||||
@@ -35,8 +35,6 @@
|
||||
<span class="label-text">{{ field.label }}</span>
|
||||
</label>
|
||||
{% else %}
|
||||
{# An otp box never takes a visible label — the boxes say what they are, and a
|
||||
heading above them just crowds the field. It keeps an sr-only one below. #}
|
||||
{% if not attrs.unlabeled and not field|is_otp %}
|
||||
<label class="label" for="{{ field.id_for_label }}">
|
||||
<span class="label-text">{{ field.label }}</span>
|
||||
@@ -88,5 +86,5 @@
|
||||
{% for error in field.errors %}<span class="label-text-alt mt-1 text-error">{{ error }}</span>{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
{% endelement %}
|
||||
|
||||
<button class="btn btn-accent gap-2" type="button" form="webauthn_form" id="mfa_webauthn_authenticate">
|
||||
{% lucide "usb" size=16 %} {% trans "Use a security key" %}
|
||||
{% lucide "user-key" size=16 %} {% trans "Use a security key" %}
|
||||
</button>
|
||||
|
||||
<form id="webauthn_form" method="post" action="{% url 'mfa_authenticate' %}">
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
{% translate "Deactivate" %}
|
||||
{% endelement %}
|
||||
{% else %}
|
||||
{% element button href=activate_url icon="smartphone" tags="panel" %}
|
||||
{% element button href=activate_url icon="qr-code" tags="panel" %}
|
||||
{% translate "Activate" %}
|
||||
{% endelement %}
|
||||
{% endif %}
|
||||
@@ -73,7 +73,7 @@
|
||||
{% endelement %}
|
||||
{% else %}
|
||||
{% url 'mfa_add_webauthn' as webauthn_add_url %}
|
||||
{% element button href=webauthn_add_url icon="usb" %}
|
||||
{% element button href=webauthn_add_url icon="user-key" %}
|
||||
{% translate "Add" %}
|
||||
{% endelement %}
|
||||
{% endif %}
|
||||
@@ -90,7 +90,8 @@
|
||||
{% slot body %}
|
||||
{% if authenticators.recovery_codes %}
|
||||
{% element p %}
|
||||
{% blocktranslate count unused_count=unused_count %}There is {{ unused_count }} out of {{ total_count }} recovery codes available.{% plural %}There are {{ unused_count }} out of {{ total_count }} recovery codes available.{% endblocktranslate %}
|
||||
{% blocktranslate count unused_count=unused_count %}There is {{ unused_count }} out of {{ total_count }} recovery codes available.{% plural %}There are {{ unused_count }} out of {{ total_count }} recovery codes available.
|
||||
{% endblocktranslate %}
|
||||
{% endelement %}
|
||||
{% else %}
|
||||
{% element p %}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
{% endslot %}
|
||||
{% slot actions %}
|
||||
{# type="button": the webauthn script takes over the click and posts the form itself. #}
|
||||
{% element button id="mfa_webauthn_add" type="button" icon="usb" %}
|
||||
{% element button id="mfa_webauthn_add" type="button" icon="user-key" %}
|
||||
{% trans "Add" %}
|
||||
{% endelement %}
|
||||
{% endslot %}
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
{% endelement %}
|
||||
{% endif %}
|
||||
{% url 'mfa_add_webauthn' as add_url %}
|
||||
{% element button href=add_url icon="usb" %}
|
||||
{% element button href=add_url icon="user-key" %}
|
||||
{% translate "Add" %}
|
||||
{% endelement %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user