aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/components/genericFormPopup
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-12-16 13:22:19 +0000
committerGerrit Code Review <gerrit@onap.org>2019-12-16 13:22:19 +0000
commit31e02ef034fddefe26d48f497462015e7976f0b5 (patch)
tree9b17b52fddebd998175296aa139df0751409046a /vid-webpack-master/src/app/shared/components/genericFormPopup
parentf279146ffd395d446a58be75d6786de41b6a9381 (diff)
parentf959829f573644c2b4d5ada940348ec4893d8a8c (diff)
Merge "When opening new VNF modal the modal should be empty."
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/genericFormPopup')
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html6
-rw-r--r--vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts6
2 files changed, 9 insertions, 3 deletions
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html
index f9a11eab1..2b2c2a75d 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html
@@ -3,7 +3,7 @@
<div class="modal-header">
<button type="button"
class="close"
- (click)="formPopupDetails?.onCancel(formPopupDetails.that,dynamicForm)">&times;
+ (click)="formPopupDetails?.onCancel(formPopupDetails.that,dynamicForm);clearModalIsUpdateMode()">&times;
</button>
<span [attr.data-tests-id]="'create-modal-title'"
class="modal-title">{{formPopupDetails?.title}}
@@ -70,14 +70,14 @@
<button
[attr.data-tests-id]="'cancelButton'"
type="button" class="btn btn-default cancel"
- (click)="formPopupDetails.onCancel(formPopupDetails.that, dynamicForm)"><span>Cancel</span></button>
+ (click)="formPopupDetails.onCancel(formPopupDetails.that, dynamicForm); clearModalIsUpdateMode()"><span>Cancel</span></button>
<input type="submit"
value="Set"
data-tests-id="form-set"
class="btn btn-success submit"
[disabled]="!dynamicForm?.valid"
- (click)="formPopupDetails.onSubmit(formPopupDetails.that, dynamicForm, servicesQty)">
+ (click)="formPopupDetails.onSubmit(formPopupDetails.that, dynamicForm, servicesQty);clearModalIsUpdateMode()">
</div>
</div>
</div>
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts
index 3939e44ff..3cd633de6 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts
@@ -15,6 +15,7 @@ import {FormControlModel} from "../../models/formControlModels/formControl.model
import {FormGeneralErrorsService} from "../formGeneralErrors/formGeneralErrors.service";
import {FeatureFlagsService, Features} from "../../services/featureFlag/feature-flags.service";
import {InstantiationTemplatesModalComponent} from "./instantiationTemplatesModal/instantiation.templates.modal.component";
+import {updateCurrentModalModeAction} from "../../storeUtil/utils/global/global.actions";
export interface PopupModel {
@@ -80,7 +81,12 @@ export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
return this.formPopupDetails && this.formPopupDetails.UUIDData['bulkSize'] > 1
}
+ clearModalIsUpdateMode() : void {
+ this._store.dispatch(updateCurrentModalModeAction(null));
+ }
+
ngOnInit(): void {
+ this._store.dispatch(updateCurrentModalModeAction(this.isUpdateMode));
this._route
.queryParams
.subscribe(params => {