mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
Added missing field in import identities form.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
:error-messages="errors"
|
||||
truncate-length="15"
|
||||
outlined
|
||||
dense
|
||||
/>
|
||||
</validation-provider>
|
||||
<label class="m-label"><translate>Separator</translate></label>
|
||||
@@ -33,12 +34,17 @@
|
||||
v-model="form.sepchar"
|
||||
:error-messages="errors"
|
||||
outlined
|
||||
dense
|
||||
/>
|
||||
<v-switch
|
||||
v-model="form.continue_if_exists"
|
||||
:label="'Continue on error'|translate"
|
||||
color="primary"
|
||||
dense
|
||||
:hint="'Don\'t treat duplicated objects as errors'|translate"
|
||||
persistent-hint
|
||||
/>
|
||||
<slot name="extraFields" v-bind:form="form" />
|
||||
</validation-observer>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
@@ -88,6 +94,7 @@ export default {
|
||||
if (this.form.continue_if_exists) {
|
||||
data.append('continue_if_exists', this.form.continue_if_exists)
|
||||
}
|
||||
this.$emit('beforeSubmit', data)
|
||||
this.$emit('submit', data)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
<import-form
|
||||
ref="importForm"
|
||||
:title="'Import identities'|translate"
|
||||
@beforeSubmit="prepareData"
|
||||
@submit="importIdentities"
|
||||
@close="showImportForm = false"
|
||||
>
|
||||
@@ -69,6 +70,16 @@
|
||||
<li><em>alias; address; enabled; recipient; recipient; ...</em></li>
|
||||
</ul>
|
||||
</template>
|
||||
<template v-slot:extraFields="{ form }">
|
||||
<v-switch
|
||||
v-model="form.crypt_passwords"
|
||||
:label="'Crypt passwords'|translate"
|
||||
color="primary"
|
||||
dense
|
||||
:hint="'Check this option if passwords contained in your file are not crypted'|translate"
|
||||
persistent-hint
|
||||
/>
|
||||
</template>
|
||||
</import-form>
|
||||
</v-dialog>
|
||||
</div>
|
||||
@@ -112,6 +123,9 @@ export default {
|
||||
this.exportContent(resp.data, 'identities')
|
||||
})
|
||||
},
|
||||
prepareData (data) {
|
||||
data.append('crypt_passwords', this.form.crypt_passwords)
|
||||
},
|
||||
importIdentities (data) {
|
||||
this.importContent(identities, data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user