This commit is contained in:
2026-08-28 14:46:19 +02:00
parent 1841623ff6
commit eeabf79f44
+15 -2
View File
@@ -59,12 +59,25 @@
</td>
<td>
{% if invoice.has_hauptvertrag %}
<div style="display: flex; gap: 0.5rem; align-items: center;">
<a href="{{ url_for('view_hauptvertrag', invoice_id=invoice.id) }}" target="_blank" rel="noopener" class="btn btn-link btn-contract">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>
Vertrag öffnen
Öffnen
</a>
<!-- Bearbeiten/Ersetzen Button -->
<div class="upload-inline-form">
<label class="btn btn-outline" style="margin: 0; padding: 0.4rem 0.6rem; cursor: pointer;" title="Vertrag aktualisieren/ersetzen">
<input type="file" multiple accept="image/*,application/pdf" onchange="openUploadModal(event, '{{ invoice.id }}')" style="display: none;">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path>
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path>
</svg>
</label>
</div>
</div>
{% else %}
<!-- WICHTIG: Kein Form-Submit mehr, stattdessen JS-Aufruf und 'multiple' -->
<!-- Normaler Erst-Upload -->
<div class="upload-inline-form">
<label class="file-dropzone">
<input type="file" multiple accept="image/*,application/pdf" onchange="openUploadModal(event, '{{ invoice.id }}')">