Charge all batteries across sub-components from parent device
This commit is contained in:
@@ -232,6 +232,32 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if device.has_children() and flat_installed %}
|
||||
<div class="card">
|
||||
<h2>Charge All Installed Batteries</h2>
|
||||
<form method="post" action="{{ url_for('device_charge_all', device_id=device.id) }}"
|
||||
style="display:flex;gap:0.5rem;flex-wrap:wrap;align-items:flex-end;">
|
||||
<div class="form-group" style="margin:0;flex:1;min-width:140px;">
|
||||
<label>Date</label>
|
||||
<input type="date" name="charged_date" required>
|
||||
</div>
|
||||
<div class="form-group" style="margin:0;align-self:flex-end;padding-bottom:1rem;">
|
||||
<label style="display:flex;align-items:center;gap:0.4rem;font-weight:normal;cursor:pointer;">
|
||||
<input type="checkbox" name="increment_cycles" value="1" checked>
|
||||
Increment charge cycles
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group" style="margin:0;flex:2;min-width:160px;">
|
||||
<label>Notes (optional)</label>
|
||||
<input type="text" name="notes" placeholder="e.g. overnight charge">
|
||||
</div>
|
||||
<div style="padding-bottom:1rem;">
|
||||
<button class="btn btn-primary" type="submit">Log Charge for All</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if not device.has_children() %}
|
||||
<div class="card">
|
||||
<h2>Install Batteries</h2>
|
||||
|
||||
Reference in New Issue
Block a user