Add multi-sport tracking with configurable recovery bonuses
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form method="post" action="/track" class="tracker-form" id="tracker-form">
|
||||
<form method="post" action="/track" class="tracker-form" id="tracker-form" autocomplete="off">
|
||||
<?= csrf_field() ?>
|
||||
<input type="hidden" name="date" value="<?= e($entry['date']) ?>">
|
||||
|
||||
@@ -65,6 +65,24 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="field-grid field-grid--single">
|
||||
<fieldset class="sport-choice-field">
|
||||
<legend>Sportarten</legend>
|
||||
<div class="sport-choice-list">
|
||||
<?php foreach ($sportTypes as $sportType): ?>
|
||||
<?php $isChecked = in_array($sportType['id'], $entry['sport_types'], true); ?>
|
||||
<label class="sport-choice">
|
||||
<input type="checkbox" name="sport_types[]" value="<?= e($sportType['id']) ?>" <?= $isChecked ? 'checked' : '' ?>>
|
||||
<span class="sport-choice__card">
|
||||
<img src="<?= e(sport_icon_path($sportType['icon'])) ?>" alt="">
|
||||
<strong><?= e($sportType['label']) ?></strong>
|
||||
</span>
|
||||
</label>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<label>
|
||||
<span>Tagebuchnotiz</span>
|
||||
<textarea name="note" rows="8" placeholder="Was war heute wichtig, schwer oder schön?"><?= e($entry['note']) ?></textarea>
|
||||
@@ -99,6 +117,7 @@
|
||||
'sleep_hours' => 'Schlafdauer',
|
||||
'sleep_feeling' => 'Schlafgefühl',
|
||||
'sport_minutes' => 'Sport',
|
||||
'sport_bonus' => 'Sportbonus',
|
||||
'walk_minutes' => 'Spaziergang',
|
||||
'note' => 'Notiz',
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user