Replace VO edit prompt() with a proper modal dialog
The browser's native prompt() chain was awkward and made it impossible to clear the bezeichnung in a single, predictable flow. The new modal mirrors the user-management dialog: it shows the provider read-only, lets you edit nummer and bezeichnung, and exposes the aktiv flag explicitly. Empty bezeichnung now correctly clears the field. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f2ab23f261
commit
97ff779bcf
2 files changed
+63
-9
No files matched your search
@@ -1552,6 +1552,35 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal: VO bearbeiten -->
|
||||
<div id="voEditModal" style="display:none; position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:1000;">
|
||||
<div style="position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); background:white; border-radius:8px; width:90%; max-width:480px; padding:24px; box-shadow:0 10px 30px rgba(0,0,0,0.2);">
|
||||
<h3 style="margin-top:0;">VO bearbeiten</h3>
|
||||
<input type="hidden" id="voEditId">
|
||||
<div class="form-group" style="margin-bottom:12px;">
|
||||
<label>Anbieter</label>
|
||||
<input type="text" id="voEditAnbieter" readonly style="width:100%; padding:8px; border:1px solid #ccc; border-radius:4px; background:#f5f5f5;">
|
||||
</div>
|
||||
<div class="form-group" style="margin-bottom:12px;">
|
||||
<label for="voEditNummer">VO-Nummer</label>
|
||||
<input type="text" id="voEditNummer" style="width:100%; padding:8px; border:1px solid #ccc; border-radius:4px;">
|
||||
</div>
|
||||
<div class="form-group" style="margin-bottom:12px;">
|
||||
<label for="voEditBezeichnung">Bezeichnung</label>
|
||||
<input type="text" id="voEditBezeichnung" placeholder="z.B. Fachhandel (leer = keine)" style="width:100%; padding:8px; border:1px solid #ccc; border-radius:4px;">
|
||||
</div>
|
||||
<div class="form-group" style="margin-bottom:18px;">
|
||||
<label style="display:flex; align-items:center; gap:8px; cursor:pointer;">
|
||||
<input type="checkbox" id="voEditAktiv"> Aktiv
|
||||
</label>
|
||||
</div>
|
||||
<div style="text-align:right;">
|
||||
<button type="button" onclick="closeVoEditModal()" style="margin-right:8px;">Abbrechen</button>
|
||||
<button type="button" class="btn-success" onclick="saveVoFromModal()">Speichern</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="messages"></div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in new issue
Block a user