From 4d1dbb5fc427e8b895a23d0ad1a2b991e9ce9a8c Mon Sep 17 00:00:00 2001
From: Dixsie Wolmers <dixsie@ibm.com>
Date: Mon, 24 Aug 2020 21:43:25 -0500
Subject: Implement consistent save button pattern

- UX audit determined that we will always keep the
  primary form action (save/submit) enabled

Signed-off-by: Dixsie Wolmers <dixsie@ibm.com>
Change-Id: Ie340f8deb673463c21149b645d6d5686806ebac9
---
 src/views/Configuration/NetworkSettings/NetworkSettings.vue | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/views/Configuration/NetworkSettings/NetworkSettings.vue')

diff --git a/src/views/Configuration/NetworkSettings/NetworkSettings.vue b/src/views/Configuration/NetworkSettings/NetworkSettings.vue
index e8c6ae81..863f2ab8 100644
--- a/src/views/Configuration/NetworkSettings/NetworkSettings.vue
+++ b/src/views/Configuration/NetworkSettings/NetworkSettings.vue
@@ -285,7 +285,6 @@
           variant="primary"
           type="submit"
           data-test-id="networkSettings-button-saveNetworkSettings"
-          :disabled="!$v.form.$anyDirty || $v.form.$invalid"
         >
           {{ $t('global.action.saveSettings') }}
         </b-button>
@@ -507,6 +506,8 @@ export default {
       this.deleteIpv4StaticTableRow(row);
     },
     submitForm() {
+      this.$v.$touch();
+      if (this.$v.$invalid) return;
       this.startLoader();
       let networkInterfaceSelected = this.selectedInterface;
       let selectedInterfaceIndex = this.selectedInterfaceIndex;
-- 
cgit v1.2.3

