Add Anrede field to Destinatär model (STI-86)
Adds optional salutation (Herr/Frau/Divers) to the Destinatär model with migration, form support, admin integration and template display. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -157,6 +157,18 @@
|
||||
<div class="card-body py-2">
|
||||
<table class="table table-sm table-borderless mb-0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-muted" style="width:140px;">Anrede</td>
|
||||
<td>
|
||||
<span class="view-mode">{{ destinataer.anrede|default:"-" }}</span>
|
||||
<select name="anrede" class="form-select form-select-sm edit-mode" style="display:none;">
|
||||
<option value="">---</option>
|
||||
<option value="Herr" {% if destinataer.anrede == 'Herr' %}selected{% endif %}>Herr</option>
|
||||
<option value="Frau" {% if destinataer.anrede == 'Frau' %}selected{% endif %}>Frau</option>
|
||||
<option value="Divers" {% if destinataer.anrede == 'Divers' %}selected{% endif %}>Divers</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-muted" style="width:140px;">Vorname</td>
|
||||
<td>
|
||||
|
||||
@@ -48,6 +48,13 @@
|
||||
<div class="card-body py-2">
|
||||
<table class="table table-sm table-borderless mb-0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-muted" style="width:140px;">Anrede</td>
|
||||
<td>
|
||||
{{ form.anrede }}
|
||||
{% if form.anrede.errors %}<div class="invalid-feedback d-block">{{ form.anrede.errors.0 }}</div>{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-muted" style="width:140px;">Vorname *</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user