UX: Formular-Buttons in Modal-Footer + Kalender-Icons amber

- Alle Formular-Buttons (health, praxen, diary, dog-profile, poison)
  aus dem scrollbaren Body in den festen Modal-Footer verschoben
  (form="form-id" Attribut, btn-Suche via document.querySelector)
- Kalender-Icon Filter korrigiert: brightness(0)+invert(0.55) vermeidet
  Channel-Clipping bei sepia auf Weiß → ergibt echtes Amber (~#C4843A)
- SW-Cache: by-v18 → by-v19
This commit is contained in:
rene 2026-04-13 21:12:15 +02:00
parent e5492841ec
commit 956e34db88
6 changed files with 57 additions and 38 deletions

View file

@ -210,7 +210,14 @@ window.Page_dog_profile = (() => {
// NEUEN HUND ANLEGEN (Modal) — auch aufrufbar via addNew()
// ----------------------------------------------------------
function _openCreateModal() {
UI.modal.open({ title: 'Weiteren Hund anlegen', body: _formHTML(null, true) });
UI.modal.open({
title: 'Weiteren Hund anlegen',
body: _formHTML(null, true),
footer: `
<button type="button" class="btn btn-secondary flex-1" id="dp-form-cancel">Abbrechen</button>
<button type="submit" form="dp-form" class="btn btn-primary flex-1">🐕 Hund anlegen</button>
`,
});
_bindForm(null, true);
}
@ -218,7 +225,14 @@ window.Page_dog_profile = (() => {
// BEARBEITEN (Modal)
// ----------------------------------------------------------
function _openEditModal(dog) {
UI.modal.open({ title: `${dog.name} bearbeiten`, body: _formHTML(dog, true) });
UI.modal.open({
title: `${dog.name} bearbeiten`,
body: _formHTML(dog, true),
footer: `
<button type="button" class="btn btn-secondary flex-1" id="dp-form-cancel">Abbrechen</button>
<button type="submit" form="dp-form" class="btn btn-primary flex-1">Speichern</button>
`,
});
_bindForm(dog, true);
}
@ -310,13 +324,14 @@ window.Page_dog_profile = (() => {
</div>
</div>
${!inModal ? `
<div style="display:flex;gap:var(--space-2);margin-top:var(--space-4)">
${(dog || inModal) ? `<button type="button" class="btn btn-secondary flex-1"
id="dp-form-cancel">Abbrechen</button>` : ''}
${dog ? `<button type="button" class="btn btn-secondary flex-1"
id="dp-form-cancel">Abbrechen</button>` : ''}
<button type="submit" class="btn btn-primary flex-1">
${dog ? 'Speichern' : '🐕 Hund anlegen'}
</button>
</div>
</div>` : ''}
${dog ? `
<div style="margin-top:var(--space-5);padding-top:var(--space-4);
@ -380,7 +395,7 @@ window.Page_dog_profile = (() => {
form.addEventListener('submit', async e => {
e.preventDefault();
const btn = form.querySelector('[type="submit"]');
const btn = document.querySelector('[form="dp-form"][type="submit"]') || form.querySelector('[type="submit"]');
const fd = UI.formData(form);
if (!fd.name?.trim()) {