diff --git a/src/api/pbx-seats.js b/src/api/pbx-seats.js index 70ef7d61..2f615e59 100644 --- a/src/api/pbx-seats.js +++ b/src/api/pbx-seats.js @@ -130,7 +130,7 @@ export function createSeat (seat) { Promise.resolve().then(() => { return createSubscriber({ username: _.kebabCase(seat.name), - password: createId(), + password: seat.sipPassword ? seat.sipPassword : createId(), display_name: seat.name, webpassword: seat.webPassword.length > 0 ? seat.webPassword : null, is_pbx_group: false, diff --git a/src/components/form/CscInputPasswordRetype.vue b/src/components/form/CscInputPasswordRetype.vue index 9d930d73..fa6ed9c3 100644 --- a/src/components/form/CscInputPasswordRetype.vue +++ b/src/components/form/CscInputPasswordRetype.vue @@ -8,7 +8,7 @@ v-bind="$attrs" generate clearable - :label="$t('Password')" + :label="passwordLabel" @input="inputPassword" @generated="passwordGenerated" @clear="passwordClear" @@ -28,7 +28,7 @@ ref="passwordRetype" v-model="passwordRetype" v-bind="$attrs" - :label="$t('Password Retype')" + :label="passwordConfirmLabel" :error="$v.passwordRetype.$error" :error-message="errorMessagePasswordRetype" clearable @@ -70,6 +70,18 @@ export default { passwordRetype: '' } } + }, + passwordLabel: { + type: String, + default () { + return this.$t('Password') + } + }, + passwordConfirmLabel: { + type: String, + default () { + return this.$t('Password Retype') + } } }, data () { diff --git a/src/components/pages/PbxConfiguration/CscPbxSeatAddForm.vue b/src/components/pages/PbxConfiguration/CscPbxSeatAddForm.vue index 80810432..9ec6d060 100644 --- a/src/components/pages/PbxConfiguration/CscPbxSeatAddForm.vue +++ b/src/components/pages/PbxConfiguration/CscPbxSeatAddForm.vue @@ -51,6 +51,16 @@ + @@ -194,6 +204,22 @@ export default { isInRange: function (value) { return inRange(value, this.getMinAllowedExtension, this.getMaxAllowedExtension, between) } + }, + password: { + password: { + required + }, + passwordRetype: { + required + } + }, + sipPassword: { + password: { + required + }, + passwordRetype: { + required + } } } }, @@ -271,6 +297,10 @@ export default { password: '', passwordRetype: '' }, + sipPassword: { + password: '', + passwordRetype: '' + }, aliasNumbers: [], groups: [], soundSet: null, @@ -285,6 +315,7 @@ export default { name: this.data.name, extension: this.data.extension, webPassword: this.data.password.password, + sipPassword: this.data.sipPassword.password, aliasNumbers: this.data.aliasNumbers, groups: this.data.groups, soundSet: this.data.soundSet, diff --git a/src/i18n/en.json b/src/i18n/en.json index f73a0140..77c5a683 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -344,6 +344,8 @@ "Ringing at": "Ringing at", "Ringing at {number}...": "Ringing at {number}...", "Russian": "Russian", + "SIP Password": "SIP Password", + "SIP Password confirm": "SIP Password confirm", "Sa": "Sa", "Same time for selected days": "Same time for selected days", "Saturday": "Saturday", @@ -442,6 +444,8 @@ "Voicemail": "Voicemail", "Voicemails": "Voicemails", "We": "We", + "Web Password": "Web Password", + "Web Password confirm": "Web Password confirm", "Wednesday": "Wednesday", "Weekly": "Weekly", "When I dial {slot} ...": "When I dial {slot} ...",