forked from mirrors/bookwyrm
b406a03533
Fixes shelves not being disabled in dropdowns. See https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing
33 lines
1.3 KiB
HTML
33 lines
1.3 KiB
HTML
{% load utilities %}
|
|
{% if fallback_url %}
|
|
<form name="fallback_form_{{ 0|uuid }}" method="GET" action="{{ fallback_url }}" autocomplete="off">
|
|
{% endif %}
|
|
<button
|
|
{% if not fallback_url %}
|
|
type="button"
|
|
{% else %}
|
|
type="submit"
|
|
{% endif %}
|
|
class="{% if not nonbutton %}button {% endif %}{{ class }}{% if button_type %} {{ button_type }}{% endif %}"
|
|
data-controls="{{ controls_text }}{% if controls_uid %}_{{ controls_uid }}{% endif %}"
|
|
{% if focus %}data-focus-target="{{ focus }}{% if controls_uid %}_{{ controls_uid }}{% endif %}"{% endif %}
|
|
{% if checkbox %}data-controls-checkbox="{{ checkbox }}{% if controls_uid %}_{{ controls_uid }}{% endif %}"{% endif %}
|
|
{% if label %}aria-label="{{ label }}"{% endif %}
|
|
aria-pressed="{% if pressed %}true{% else %}false{% endif %}"
|
|
{% if disabled %}disabled{% endif %}
|
|
>
|
|
|
|
{% if icon %}
|
|
<span class="icon icon-{{ icon }} m-0-mobile" title="{{ text }}">
|
|
<span class="is-sr-only">{{ text }}</span>
|
|
</span>
|
|
{% elif icon_with_text %}
|
|
<span class="icon icon-{{ icon_with_text }} m-0-mobile" title="{{ text }}"></span>
|
|
<span class="is-sr-only-mobile">{{ text }}</span>
|
|
{% else %}
|
|
<span>{{ text }}</span>
|
|
{% endif %}
|
|
</button>
|
|
{% if fallback_url %}
|
|
</form>
|
|
{% endif %}
|