Battery charge interval was not editable and not shown anywhere

This commit is contained in:
Bernd Bestel 2018-07-26 17:28:30 +02:00
parent aaa270a52f
commit 9e493430d8
3 changed files with 12 additions and 0 deletions

View File

@ -186,6 +186,8 @@ return array(
'Unknown' => 'Unbekannt',
'Filter by habit' => 'Nach Gewohnheit filtern',
'Habits analysis' => 'Gewohnheiten Analyse',
'0 means suggestions for the next charge cycle are disabled' => '0 bedeutet dass Vorschläge für den nächsten Ladezyklus deaktiviert sind',
'Charge cycle interval (days)' => 'Ladezyklusintervall (Tage)',
//Constants
'manually' => 'Manuell',

View File

@ -32,6 +32,7 @@
<th>{{ $L('Name') }}</th>
<th>{{ $L('Description') }}</th>
<th>{{ $L('Used in') }}</th>
<th>{{ $L('Charge cycle interval (days)') }}</th>
</tr>
</thead>
<tbody>
@ -54,6 +55,9 @@
<td>
{{ $battery->used_in }}
</td>
<td>
{{ $battery->charge_interval_days }}
</td>
</tr>
@endforeach
</tbody>

View File

@ -37,6 +37,12 @@
<input type="text" class="form-control" id="used_in" name="used_in" value="@if($mode == 'edit'){{ $battery->used_in }}@endif">
</div>
<div class="form-group">
<label for="charge_interval_days">{{ $L('Charge cycle interval (days)') }}<br><span class="small text-muted">{{ $L('0 means suggestions for the next charge cycle are disabled') }}</span></label>
<input required min="0" step="1" type="number" class="form-control" id="charge_interval_days" name="charge_interval_days" value="@if($mode == 'edit'){{ $battery->charge_interval_days }}@else{{0}}@endif">
<div class="invalid-feedback">{{ $L('This cannot be negative') }}</div>
</div>
<button id="save-battery-button" type="submit" class="btn btn-success">{{ $L('Save') }}</button>
</form>