Replace pages' use of the options call with directly building the HTML components using templates, as the syntax is much nicer. Use a common set of data provided to all modules via pagetemplate.py instead of passing things like web_ui_options around. Closes #153

This commit is contained in:
Ian Renton
2026-09-25 21:22:31 +01:00
parent 4df00c321c
commit 8de163469b
27 changed files with 493 additions and 534 deletions
+22 -2
View File
@@ -1,6 +1,26 @@
<div class="card">
<div class="card-body">
<h5 class="card-title">Bands</h5>
<div id="band-options" class="card-text spothole-card-text"></div>
<div class="card-text spothole-card-text">
<div class="row row-cols-3 row-cols-md-2 row-cols-lg-3 row-cols-xxl-4 g-1 mb-1">
{% for b in options["bands"] %}
<div class="col">
<div class="form-check">
<input type="checkbox" class="form-check-input filter-button-band storeable-checkbox"
id="filter-button-band-{{ dom_safe_name(b.name) }}" value="{{ b.name }}"
data-ham-hf="{{ 'true' if b.is_ham_hf else 'false' }}"
autocomplete="off" onClick="filtersUpdated()" checked>
<label class="form-check-label" for="filter-button-band-{{ dom_safe_name(b.name) }}">{{ b.name
}}</label>
</div>
</div>
{% end %}
</div>
<div class="mt-1">
<a href="#" onclick="toggleFilterButtons('band', true); return false;">All</a> &nbsp;
<a href="#" onclick="toggleFilterButtons('band', false); return false;">None</a> &nbsp;
<a href="#" onclick="setHamHFBandToggles(); return false;">Ham HF only</a>
</div>
</div>
</div>
</div>
</div>