Refactor MemberTransferSettingsView to use a computed property for the import template placeholder text, improving localization handling and avoiding issues with vue-i18n placeholders.
This commit is contained in:
@@ -143,7 +143,7 @@
|
||||
v-model="importTemplate"
|
||||
rows="8"
|
||||
class="form-textarea import-area"
|
||||
:placeholder="$t('memberTransfer.importTemplatePlaceholder')"
|
||||
:placeholder="importTemplatePlaceholderText"
|
||||
></textarea>
|
||||
<button
|
||||
type="button"
|
||||
@@ -375,6 +375,11 @@ address={{address}}`;
|
||||
return this.$t('memberTransfer.templateDescription').replace('{0}', '{{firstName}}');
|
||||
},
|
||||
|
||||
importTemplatePlaceholderText() {
|
||||
// Verwende den Placeholder-Text direkt, um Probleme mit vue-i18n Platzhaltern zu vermeiden
|
||||
return `Fügen Sie hier ein vollständiges Beispiel-Template ein, z.B.:\n{\n "members": [\n {\n "firstName": "Max",\n "lastName": "Mustermann",\n "email": "max@example.com"\n }\n ]\n}`;
|
||||
},
|
||||
|
||||
templatePlaceholder() {
|
||||
if (this.config.transferFormat === 'json') {
|
||||
return '{"firstName": "{{firstName}}", "lastName": "{{lastName}}", "geburtsdatum": "{{geburtsdatum}}", "email": "{{email}}", "phone": "{{phone}}", "address": "{{address}}"}';
|
||||
|
||||
Reference in New Issue
Block a user