gymrooster_php/templates/dashboard.html.php

29 lines
1.1 KiB
PHP
Raw Normal View History

<?php require __DIR__ . '/../php/dashboard.php' ?>
2020-03-09 19:09:41 +01:00
<header>
<h1>Gymrooster</h1>
<h3>Welkom <?=$docent['naam']?></h3>
<h3><?=date("D d M Y", strtotime($date))?></h3>
<a href="/dashboard?date=<?=date("Y-m-d", strtotime("-1 day", strtotime($date)))?>">&lt;&nbsp;Dag eerder</a>
<a href="/dashboard?date=<?=date("Y-m-d", strtotime("+1 day", strtotime($date)))?>">Dag later&nbsp;&gt;</a>
</header>
<form id="submitForm" action="update?date=<?=$date?>&docent=<?=$docent['id']?>" method="post">
2020-03-09 19:09:41 +01:00
<textarea name="opmerking" placeholder="Opmerkingen"><?=$rooster['opmerking']?></textarea><br>
<select name="locatie">
<?php if ($rooster['locatie'] === "1"): ?>
<option value="1">Binnen</option>
<option value="2">Buiten</option>
<?php else: ?>
<option value="2">Buiten</option>
<option value="1">Binnen</option>
<?php endif; ?>
</select>
<button type="submit">Opslaan</button>
</form>
<script>
document.getElementById('submitForm').addEventListener('submit', function(e) {
document.querySelectorAll('#submitForm button')[0].innerHTML = "✓ Opgeslagen";
});
</script>