Suggestions implemented II

This commit is contained in:
ogerly 2019-08-14 14:12:17 +02:00
parent bd27876d9c
commit b3ab6e1b43
3 changed files with 87 additions and 77 deletions

View File

@ -1,4 +1,5 @@
<template> <template>
<ds-container width="small">
<ds-card v-if="success" class="success"> <ds-card v-if="success" class="success">
<ds-space> <ds-space>
<sweetalert-icon icon="success" /> <sweetalert-icon icon="success" />
@ -46,12 +47,18 @@
:label="$t('settings.security.change-password.label-new-password-confirm')" :label="$t('settings.security.change-password.label-new-password-confirm')"
/> />
<password-strength :password="formData.password" /> <password-strength :password="formData.password" />
<ds-section>
<ds-text> <ds-text>
<input id="checkbox" type="checkbox" v-model="checkedDefault" @change="checked" /> <input
<label for="checkbox" v-html="$t('site.termsAndConditionsCeckbox')"></label> id="checkbox"
type="checkbox"
v-model="checkedConfimed"
@change="checked"
:checked="checkedConfimed"
/>
<label for="checkbox" v-html="$t('site.termsAndConditionsRead')"></label>
</ds-text> </ds-text>
</ds-section>
<template slot="footer"> <template slot="footer">
<ds-space class="backendErrors" v-if="backendErrors"> <ds-space class="backendErrors" v-if="backendErrors">
<ds-text align="center" bold color="danger">{{ backendErrors.message }}</ds-text> <ds-text align="center" bold color="danger">{{ backendErrors.message }}</ds-text>
@ -70,6 +77,7 @@
</ds-card> </ds-card>
</template> </template>
</ds-form> </ds-form>
</ds-container>
</template> </template>
<script> <script>
@ -112,7 +120,7 @@ export default {
disabled: true, disabled: true,
success: null, success: null,
backendErrors: null, backendErrors: null,
checkedDefault: false, checkedConfimed: false,
} }
}, },
props: { props: {
@ -121,10 +129,12 @@ export default {
}, },
methods: { methods: {
checked: function() { checked: function() {
this.backendErrors = { message: '' } this.backendErrors = { message: null }
console.log('tzzzzzzzzzz')
this.disabled = true
}, },
async submit() { async submit() {
if (this.checkedDefault) { if (this.checkedConfimed) {
const { name, password, about } = this.formData const { name, password, about } = this.formData
const { email, nonce } = this const { email, nonce } = this
try { try {
@ -143,7 +153,7 @@ export default {
this.backendErrors = err this.backendErrors = err
} }
} else { } else {
this.backendErrors = { message: this.$t(`site.termsAndConditionsNoChecked`) } this.backendErrors = { message: this.$t(`site.confirmTermsAndConditions`) }
} }
}, },
}, },

View File

@ -23,8 +23,8 @@
"bank": "Bankverbindung", "bank": "Bankverbindung",
"germany": "Deutschland", "germany": "Deutschland",
"code-of-conduct": "Verhaltenscodex", "code-of-conduct": "Verhaltenscodex",
"termsAndConditionsCeckbox": "<a href=\"/terms-and-conditions\" target=\"_blank\">Nutzungsbedingungen</a> gelesen und verstanden", "termsAndConditionsRead": "<a href=\"/terms-and-conditions\" target=\"_blank\">Nutzungsbedingungen</a> gelesen und verstanden",
"termsAndConditionsNoChecked": "Bitte lies und bestätige die Nutzungsbednigungen!" "confirmTermsAndConditions": "Bitte lies und bestätige die Nutzungsbednigungen!"
}, },
"sorting": { "sorting": {
"newest": "Neuste", "newest": "Neuste",

View File

@ -23,8 +23,8 @@
"bank": "bank account", "bank": "bank account",
"germany": "Germany", "germany": "Germany",
"code-of-conduct": "Code of Conduct", "code-of-conduct": "Code of Conduct",
"termsAndConditionsCeckbox": "<a href=\"/terms-and-conditions\" target=\"_blank\">Terms and conditions</a> read and understood", "termsAndConditionsRead": "<a href=\"/terms-and-conditions\" target=\"_blank\">Terms and conditions</a> read and understood",
"termsAndConditionsNoChecked": "Please read and confirm the Terms and conditions!" "confirmTermsAndConditions": "Please read and confirm the Terms and conditions!"
}, },
"sorting": { "sorting": {
"newest": "Newest", "newest": "Newest",