Notes / snooze, update data migration
- WIP on finishing out request list
This commit is contained in:
28
src/public/components/request/add-note.php
Normal file
28
src/public/components/request/add-note.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
use MyPrayerJournal\{Auth, Layout, Request};
|
||||
|
||||
require '../../../start.php';
|
||||
if ($_SERVER['REQUEST_METHOD'] <> 'GET') not_found();
|
||||
|
||||
Auth::requireUser(false);
|
||||
|
||||
$req = Request::byId($_GET['id']);
|
||||
if (!$req) not_found();
|
||||
|
||||
Layout::bareHead(); ?>
|
||||
<form hx-post="/request/note?id=<?=$req->id?>">
|
||||
<div class="form-floating pb-3">
|
||||
<textarea id=notes name=notes class=form-control style="min-height: 8rem;" placeholder=Notes autofocus
|
||||
required></textarea>
|
||||
<label for=notes>Notes</label>
|
||||
</div>
|
||||
<p class=text-end><button type=submit class="btn btn-primary">Add Notes</button>
|
||||
</form>
|
||||
<hr style="margin: .5rem -1rem">
|
||||
<div id=priorNotes>
|
||||
<p class="text-center pt-3">
|
||||
<button type=button class="btn btn-secondary" hx-get="/components/request/notes?id=<?=$req->id?>"
|
||||
hx-swap=outerHTML hx-target=#priorNotes>Load Prior Notes</button>
|
||||
</div><?php
|
||||
Layout::bareFoot();
|
||||
Reference in New Issue
Block a user