appointment.html
| 1 | {{define "title"}}Termin bearbeiten{{end}} |
| 2 | {{define "content"}} |
| 3 | {{$a := .A}} |
| 4 | <nav aria-label="breadcrumb"><ul><li><a href="/termine">Termine</a></li><li><a href="/patient/{{$a.PatientID}}#termine">{{$a.PatientName}}</a></li><li>{{day $a.Start}}</li></ul></nav> |
| 5 | {{with .Error}}<p class="error" role="alert">{{.}}</p>{{end}} |
| 6 | <article> |
| 7 | <h2>Termin bearbeiten</h2> |
| 8 | <form method="post" action="/termin/{{$a.ID}}"> |
| 9 | <div class="appt-fields"> |
| 10 | <label>Datum <input type="date" name="date" value="{{ymd $a.Start}}" required></label> |
| 11 | <label>Uhrzeit <input type="time" name="time" value="{{hm $a.Start}}" step="300" required></label> |
| 12 | <label>Dauer (Min.) <input type="number" name="duration" value="{{$a.Duration}}" min="5" max="480" step="5"></label> |
| 13 | <label>Behandler |
| 14 | <select name="therapist"><option value="0">—</option> |
| 15 | {{range .Therapists}}{{if or .Active (eq .ID $a.TherapistID)}}<option value="{{.ID}}"{{if eq .ID $a.TherapistID}} selected{{end}}>{{.Name}}</option>{{end}}{{end}} |
| 16 | </select> |
| 17 | </label> |
| 18 | <label>Art <input name="title" value="{{$a.Title}}"></label> |
| 19 | <label>Ort <input name="location" value="{{$a.Location}}"></label> |
| 20 | <label class="wide">Hinweis für den Patienten <input name="note" value="{{$a.Note}}"></label> |
| 21 | </div> |
| 22 | <label class="consent"><input type="checkbox" name="cancelled" value="1"{{if $a.Cancelled}} checked{{end}}> Abgesagt</label> |
| 23 | <div class="actions"><button type="submit">Speichern</button><a href="/patient/{{$a.PatientID}}#termine">Abbrechen</a></div> |
| 24 | <small class="muted">Änderungen erscheinen im Kalender des Patienten beim nächsten Abgleich (meist innerhalb einer Stunde).</small> |
| 25 | </form> |
| 26 | </article> |
| 27 | <details class="danger"> |
| 28 | <summary>Termin löschen …</summary> |
| 29 | <form method="post" action="/termin/{{$a.ID}}/loeschen"> |
| 30 | <p>Besser „Abgesagt“ anhaken – dann sieht der Patient die Absage im Kalender. Gelöschte Termine verschwinden einfach.</p> |
| 31 | <button type="submit" class="danger">Endgültig löschen</button> |
| 32 | </form> |
| 33 | </details> |
| 34 | {{end}} |
| 35 |