removed mailbox_quota from UserCreate

This commit is contained in:
Axolotle 2020-11-03 16:44:18 +01:00
parent 9caac2439f
commit 01d37e0835

View file

@ -47,15 +47,6 @@
</b-input-group> </b-input-group>
</template> </template>
</form-field> </form-field>
<!-- MAILBOX QUOTA -->
<form-field v-bind="fields.mailbox_quota" :validation="$v.form.mailbox_quota">
<template #default="{ self }">
<b-input-group append="M">
<input-item v-bind="self" v-model="form.mailbox_quota" />
</b-input-group>
</template>
</form-field>
<hr> <hr>
<!-- USER PASSWORD --> <!-- USER PASSWORD -->
@ -72,7 +63,7 @@ import { validationMixin } from 'vuelidate'
import { formatFormData } from '@/helpers/yunohostArguments' import { formatFormData } from '@/helpers/yunohostArguments'
import { import {
alphalownum_, unique, required, minLength, name, sameAs, integer, minValue alphalownum_, unique, required, minLength, name, sameAs
} from '@/helpers/validators' } from '@/helpers/validators'
@ -90,7 +81,6 @@ export default {
lastname: '' lastname: ''
}, },
domain: '', domain: '',
mailbox_quota: 0,
password: '', password: '',
confirmation: '' confirmation: ''
}, },
@ -126,21 +116,10 @@ export default {
domain: { domain: {
id: 'mail', id: 'mail',
label: this.$i18n.t('user_email'), label: this.$i18n.t('user_email'),
description: this.$i18n.t('user_mail_domain_description'), description: this.$i18n.t('tip_about_user_email'),
props: { choices: [] } props: { choices: [] }
}, },
mailbox_quota: {
label: this.$i18n.t('user_mailbox_quota'),
description: this.$i18n.t('mailbox_quota_description'),
example: this.$i18n.t('mailbox_quota_example'),
props: {
id: 'mailbox-quota',
placeholder: this.$i18n.t('mailbox_quota_placeholder'),
type: 'number'
}
},
password: { password: {
label: this.$i18n.t('password'), label: this.$i18n.t('password'),
description: this.$i18n.t('good_practices_about_user_password'), description: this.$i18n.t('good_practices_about_user_password'),
@ -174,7 +153,6 @@ export default {
lastname: { required, name } lastname: { required, name }
}, },
domain: { required }, domain: { required },
mailbox_quota: { positiveIntegrer: required, integer, minValue: minValue(0) },
password: { required, passwordLenght: minLength(8) }, password: { required, passwordLenght: minLength(8) },
confirmation: { required, passwordMatch: sameAs('password') } confirmation: { required, passwordMatch: sameAs('password') }
} }
@ -184,9 +162,6 @@ export default {
methods: { methods: {
onSubmit () { onSubmit () {
const data = formatFormData(this.form, { flatten: true }) const data = formatFormData(this.form, { flatten: true })
if (parseInt(data.mailbox_quota) !== 0) {
data.mailbox_quota += 'M'
}
this.$store.dispatch( this.$store.dispatch(
'POST', { uri: 'users', data } 'POST', { uri: 'users', data }
).then(() => { ).then(() => {