diff --git a/frontend/src/components/domains/DomainCreationForm.vue b/frontend/src/components/domains/DomainCreationForm.vue index d9f45769e..1d82e53e4 100644 --- a/frontend/src/components/domains/DomainCreationForm.vue +++ b/frontend/src/components/domains/DomainCreationForm.vue @@ -101,84 +101,10 @@
Summary
-
- General - Modify -
- - Name - {{ domain.name }} - - - Type - {{ domain.type }} - - - Enabled - {{ domain.enabled|yesno }} - -
- DNS - Modify -
- - Enable DNS checks - {{ domain.enable_dns_checks|yesno }} - - - Enable DKIM signing - {{ domain.enable_dkim|yesno }} - - - DKIM key selector - {{ domain.dkim_key_selector }} - - - DKIM key length - {{ domain.dkim_key_length }} - -
- Limitations - Modify -
- - Quota - {{ domain.quota }} - - - Default mailbox quota - {{ domain.default_mailbox_quota }} - - - Message sending limit - {{ domain.message_sending_limit }} - -
- Options - Modify -
- - Create a domain administrator - {{ createAdmin|yesno }} - -
- - Administrator name - {{ domain.domain_admin.username }} - - - Random password - {{ domain.domain_admin.with_random_password|yesno }} - - - With mailbox - {{ domain.domain_admin.with_mailbox|yesno }} - - - Create aliases - {{ domain.domain_admin.with_aliases|yesno }} - -
+
import { bus } from '@/main' import ConfirmDialog from '@/components/layout/ConfirmDialog' +import CreationSummary from '@/components/tools/CreationSummary' import DomainDNSForm from './DomainDNSForm' import DomainGeneralForm from './DomainGeneralForm' import DomainLimitationsForm from './DomainLimitationsForm' @@ -207,11 +134,70 @@ export default { props: ['value'], components: { ConfirmDialog, + CreationSummary, 'domain-dns-form': DomainDNSForm, DomainGeneralForm, DomainLimitationsForm, DomainOptionsForm }, + computed: { + summarySections () { + const result = [ + { + title: this.$gettext('General'), + items: [ + { key: this.$gettext('Name'), value: this.domain.name }, + { key: this.$gettext('Type'), value: this.domain.type }, + { key: this.$gettext('Enabled'), value: this.domain.enabled, type: 'yesno' } + ] + }, + { + title: this.$gettext('DNS'), + items: [ + { key: this.$gettext('Enable DNS checks'), value: this.domain.enable_dns_checks, type: 'yesno' }, + { key: this.$gettext('Enable DKIM signing'), value: this.domain.enable_dkim, type: 'yesno' } + ] + }, + { + title: this.$gettext('Limitations'), + items: [ + { key: this.$gettext('Quota'), value: this.domain.quota }, + { key: this.$gettext('Default mailbox quota'), value: this.domain.default_mailbox_quota }, + { key: this.$gettext('Message sending limit'), value: this.domain.message_sending_limit } + ] + }, + { + title: this.$gettext('Options'), + items: [ + { key: this.$gettext('Create a domain administrator'), value: this.createAdmin, type: 'yesno' } + ] + } + ] + if (this.domain.enable_dkim) { + result[1].items.push({ key: this.$gettext('DKIM key selector'), value: this.domain.dkim_key_selector }) + result[1].items.push({ key: this.$gettext('DKIM key length'), value: this.domain.dkim_key_length }) + } + if (this.createAdmin) { + result[3].items.push({ key: this.$gettext('Administrator name'), value: this.domain.domain_admin.username }) + result[3].items.push({ + key: this.$gettext('Random password'), + value: this.domain.domain_admin.with_random_password, + type: 'yesno' + }) + result[3].items.push({ + key: this.$gettext('With mailbox'), + value: this.domain.domain_admin.with_mailbox, + type: 'yesno' + }) + result[3].items.push({ + key: this.$gettext('Create aliases'), + value: this.domain.domain_admin.with_aliases, + type: 'yesno' + }) + } + return result + } + }, data () { return { createAdmin: false,