manual submission redesign phase B
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{% load i18n %}
|
||||
<div class="manual-direction-panel{% if measuring %} manual-direction-panel--measuring{% endif %}" id="manual-direction-panel">
|
||||
{% if measuring %}
|
||||
<div class="manual-direction-panel__topline">
|
||||
<strong class="manual-direction-panel__heading">{% trans "Capture direction" %}</strong>
|
||||
<button class="manual-direction-panel__close" type="button" hx-get="{% url 'fireworks_detect:manual_direction_panel' %}" hx-target="#manual-direction-panel" hx-swap="outerHTML" aria-label="{% trans 'Close direction capture' %}">×</button>
|
||||
</div>
|
||||
<p class="manual-direction-panel__copy">{% trans "Point the top of your phone toward the fireworks, then capture a single compass reading." %}</p>
|
||||
<div id="manual-direction-status" class="manual-direction-panel__status" aria-live="polite"></div>
|
||||
<button id="manual-capture-direction" class="manual-direction-panel__button" type="button">{% trans "Start measuring direction" %}</button>
|
||||
{% else %}
|
||||
<strong class="manual-direction-panel__heading">{% trans "Direction" %} <span>({% trans "optional" %})</span></strong>
|
||||
<p id="manual-direction-summary" class="manual-direction-panel__summary">{% trans "Not captured" %}</p>
|
||||
<button class="manual-direction-panel__open" type="button" hx-get="{% url 'fireworks_detect:manual_direction_panel' %}?mode=measure" hx-target="#manual-direction-panel" hx-swap="outerHTML">{% trans "Capture direction" %}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -13,16 +13,15 @@
|
||||
<input id="manual-direction-accuracy" name="direction_accuracy_degrees" type="hidden">
|
||||
<div class="manual-report__primary">
|
||||
<div class="manual-report__quantity">
|
||||
<label class="manual-report__label" for="manual-occurrences">{% trans "Number of occurrences" %}</label>
|
||||
<input id="manual-occurrences" name="occurrences" type="number" min="1" max="1000" value="1" required inputmode="numeric">
|
||||
<label class="manual-report__label" for="manual-occurrences">{% trans "How many times did you hear it?" %}</label>
|
||||
<div class="manual-report__stepper">
|
||||
<button id="manual-decrease" type="button" aria-label="{% trans 'Decrease occurrences' %}">−</button>
|
||||
<input id="manual-occurrences" name="occurrences" type="number" min="1" max="1000" value="1" required inputmode="numeric">
|
||||
<button id="manual-increase" type="button" aria-label="{% trans 'Increase occurrences' %}">+</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="manual-direction-panel" id="manual-direction-panel" hidden>
|
||||
<strong class="manual-direction-panel__heading">{% trans "Direction" %} <span>({% trans "optional" %})</span></strong>
|
||||
<p class="manual-direction-panel__copy">{% trans "Point the top of your phone toward the fireworks, then capture a single compass reading." %}</p>
|
||||
<button id="manual-capture-direction" class="manual-direction-panel__button" type="button">{% trans "Capture direction" %}</button>
|
||||
<div id="manual-direction-status" class="manual-direction-panel__status" aria-live="polite"></div>
|
||||
</div>
|
||||
<button id="manual-submit" class="manual-report__submit" type="button">{% trans "I heard fireworks — send to Pending" %}</button>
|
||||
{% include "fireworks_detect/includes/manual_direction_panel.html" %}
|
||||
<button id="manual-submit" class="manual-report__submit" type="button"><span aria-hidden="true">🔥</span> {% trans "I heard fireworks" %}</button>
|
||||
</div>
|
||||
<section class="manual-report__supporting" aria-labelledby="manual-listening-title">
|
||||
<h3 id="manual-listening-title">{% trans "Automatic detection" %}</h3>
|
||||
|
||||
Reference in New Issue
Block a user