aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models/forms
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-08-07 07:05:40 +0300
committerMichael Lando <ml636r@att.com>2017-08-07 07:05:40 +0300
commitb2c60183d5d654b945a24ec5564807e4f691c6e8 (patch)
treed6cdc354fa7ce27ea1e0ce60e6c57aa7c1ef20b6 /catalog-ui/src/app/view-models/forms
parentd1d771bed17c6a5beea19af8da0bf9113972f25a (diff)
[SDC] code sync
Change-Id: I576dd69504722c341b0f41a1f6232ed3f4bee8df Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-ui/src/app/view-models/forms')
-rw-r--r--catalog-ui/src/app/view-models/forms/resource-instance-name-form/resource-instance-name-model.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/catalog-ui/src/app/view-models/forms/resource-instance-name-form/resource-instance-name-model.ts b/catalog-ui/src/app/view-models/forms/resource-instance-name-form/resource-instance-name-model.ts
index 3f0838cabc..fa027296d6 100644
--- a/catalog-ui/src/app/view-models/forms/resource-instance-name-form/resource-instance-name-model.ts
+++ b/catalog-ui/src/app/view-models/forms/resource-instance-name-form/resource-instance-name-model.ts
@@ -109,7 +109,8 @@ export class ResourceInstanceNameViewModel {
];
this.$scope.$watch("[forms.editNameForm.$invalid,componentInstanceModel.name,isAlreadyPressed]", (newVal, oldVal) => {
- this.$scope.footerButtons[0].disabled = this.$scope.forms.editNameForm.$invalid || this.$scope.isAlreadyPressed || this.$scope.componentInstanceModel.name === this.$scope.oldName;
+ //if the name is invalid or if user pressed ok and didn't try to change name again or the new name = source name
+ this.$scope.footerButtons[0].disabled = this.$scope.forms.editNameForm.$invalid || (this.$scope.isAlreadyPressed && newVal[1] === oldVal[1]) || this.$scope.componentInstanceModel.name === this.$scope.oldName;
});
}
}