From c75e215574e1764713987f393f76ee1674e1af9c Mon Sep 17 00:00:00 2001 From: raxelsen Date: Mon, 29 Oct 2018 16:41:35 +0100 Subject: [PATCH] TT#46176 CallForward destination input validation Change-Id: Icdd8dd3aeccaa3056bd9a2598918f1b6b3bce7d6 --- src/components/form/CscCallInput.vue | 7 ++- .../CallForward/CscAddDestinationForm.vue | 60 ++++++------------- .../pages/SpeedDial/CscSpeedDialAddForm.vue | 16 +++-- 3 files changed, 35 insertions(+), 48 deletions(-) diff --git a/src/components/form/CscCallInput.vue b/src/components/form/CscCallInput.vue index 0877dedc..a50840fe 100644 --- a/src/components/form/CscCallInput.vue +++ b/src/components/form/CscCallInput.vue @@ -16,6 +16,7 @@ @input="input" @blur="blur" :error="$v.inputValue.$error" + :before="beforeButtons" /> @@ -34,7 +35,8 @@ export default { name: 'csc-call-input', props: { - label: String + label: String, + before: Array }, data () { return { @@ -69,6 +71,9 @@ else if (!this.$v.inputValue.userInfo) { return this.$t('validationErrors.inputValidNumber'); } + }, + beforeButtons() { + return this.before ? this.before : []; } }, methods: { diff --git a/src/components/pages/CallForward/CscAddDestinationForm.vue b/src/components/pages/CallForward/CscAddDestinationForm.vue index c76706f4..dbcaad76 100644 --- a/src/components/pages/CallForward/CscAddDestinationForm.vue +++ b/src/components/pages/CallForward/CscAddDestinationForm.vue @@ -28,24 +28,13 @@
- - - + @@ -74,7 +63,7 @@ icon="check" color="primary" @click="addDestination()" - :disable="$v.destinationForm.destination.$error || $v.destinationForm.timeout.$error" + :disable="$v.destinationForm.timeout.$error || destinationError" > {{ $t('buttons.save') }} @@ -84,6 +73,7 @@