mirror of
https://codeberg.org/catask-org/catask.git
synced 2025-04-20 05:43:41 -05:00
add accessibility page template
This commit is contained in:
parent
1beec55bac
commit
d886d1af58
1 changed files with 53 additions and 0 deletions
53
templates/admin/categories/accessibility.html
Normal file
53
templates/admin/categories/accessibility.html
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
{% extends 'admin/base.html' %}
|
||||||
|
{% block _title %}Accessibility{% endblock %}
|
||||||
|
{% set access_link = 'active' %}
|
||||||
|
{% block _content %}
|
||||||
|
<form hx-post="{{ url_for('api.updateConfig') }}" hx-target="#response-container" hx-swap="none">
|
||||||
|
<h2 id="general" class="mb-3 fw-normal">Accessibility</h2>
|
||||||
|
<div class="form-group mb-4">
|
||||||
|
<label class="form-label" for="antispam.type">Font</label>
|
||||||
|
<select id="accessibility.font" name="accessibility.font" class="form-select">
|
||||||
|
<option value="default"{% if cfg.accessibility.font == 'default' %} selected{% endif %}>Default</option>
|
||||||
|
<option value="system"{% if cfg.accessibility.font == 'system' %} selected{% endif %}>System</option>
|
||||||
|
<option value="atkinson"{% if cfg.accessibility.font == 'atkinson' %} selected{% endif %}>Atkinson Hyperlegible</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<h3 id="antispam" class="mb-2 fw-normal d-flex align-items-center gap-2">UserWay <a href="https://userway.org/" target="_blank" class="fs-5" title="what's this?"><i class="bi bi-question-circle"></i></a></h3>
|
||||||
|
<div class="form-check form-switch mb-3">
|
||||||
|
<input
|
||||||
|
class="form-check-input"
|
||||||
|
type="checkbox"
|
||||||
|
name="_accessibility.userway.enabled"
|
||||||
|
id="_accessibility.userway.enabled"
|
||||||
|
value="{{ cfg.accessibility.userway.enabled }}"
|
||||||
|
role="switch"
|
||||||
|
{% if cfg.accessibility.userway.enabled %}checked{% endif %}>
|
||||||
|
<input type="hidden" id="accessibility.userway.enabled" name="accessibility.userway.enabled" value="{{ cfg.accessibility.userway.enabled }}">
|
||||||
|
<label for="_accessibility.userway.enabled" class="form-check-label">Enabled</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mb-3">
|
||||||
|
<label class="form-label" for="accessibility.userway.account">Account key</label>
|
||||||
|
<input type="text" id="accessibility.userway.account" name="accessibility.userway.account" value="{{ cfg.accessibility.userway.account }}" class="form-control">
|
||||||
|
<p class="form-text">
|
||||||
|
UserWay account key, find one at <a href="https://manage.userway.org/embed-code" target="_blank">manage.userway.org/embed-code</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button type="submit" class="btn btn-primary mt-3" id="saveConfig">
|
||||||
|
<span class="spinner-border spinner-border-sm htmx-indicator" aria-hidden="true"></span>
|
||||||
|
<span class="visually-hidden" role="status">Loading...</span>
|
||||||
|
Save
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
||||||
|
{% block _scripts %}
|
||||||
|
<script>
|
||||||
|
// fix handling checkboxes
|
||||||
|
document.querySelectorAll('.form-check-input[type=checkbox]').forEach(function(checkbox) {
|
||||||
|
checkbox.addEventListener('change', function() {
|
||||||
|
checkbox.nextElementSibling.value = this.checked ? 'True' : 'False';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
Loading…
Add table
Reference in a new issue