Skip to content

Commit

Permalink
MOSIP-14073 added condition for disable update button
Browse files Browse the repository at this point in the history
Signed-off-by: Madhuravas <[email protected]>
  • Loading branch information
Madhuravas committed Feb 5, 2024
1 parent e20d620 commit c42b14b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ <h3>{{ "center.location-details" | translate }}</h3>
</mat-form-field>
</div>
<mat-card-actions class="action-buttons">
<button id="createButton" mat-raised-button *ngIf="data.length != 0" (click)="submitPrimaryPanel()">
<button [disabled]="!primaryForm.dirty" id="createButton" mat-raised-button *ngIf="data.length != 0" (click)="submitPrimaryPanel()">
{{ "center.update" | translate }}
</button>
<button id="createButton" mat-raised-button *ngIf="data.length == 0" (click)="submitPrimaryPanel()">
<button [disabled]="!primaryForm.dirty" id="createButton" mat-raised-button *ngIf="data.length == 0" (click)="submitPrimaryPanel()">
{{ "center.create" | translate }}
</button>
<button mat-raised-button id="cancel" (click)="cancel()" *ngIf="secondaryLang">
Expand Down Expand Up @@ -257,11 +257,11 @@ <h3>{{ secondaryLanguageLabels["location-details"] }}</h3>
</mat-form-field>
</div>
<mat-card-actions class="action-buttons">
<button id="createButton" mat-raised-button *ngIf="showUpdateButton"
<button [disabled]="!secondaryForm.dirty" id="createButton" mat-raised-button *ngIf="showUpdateButton"
(click)="submitSecondaryPanel()">
{{ "center.update" | translate }}
</button>
<button id="createButton" mat-raised-button *ngIf="!showUpdateButton"
<button [disabled]="!secondaryForm.dirty" id="createButton" mat-raised-button *ngIf="!showUpdateButton"
(click)="submitSecondaryPanel()">
{{ "center.create" | translate }}
</button>
Expand Down Expand Up @@ -687,7 +687,7 @@ <h3>{{ "center.operational-details" | translate }}</h3>
<mat-divider [vertical]="true" [inset]="true"></mat-divider>
</mat-card-content>
<mat-card-actions class="action-buttons">
<button id="createButton" mat-raised-button (click)="submitCommonPanel()">
<button [disabled]="!commonForm.dirty" id="createButton" mat-raised-button (click)="submitCommonPanel()">
{{ "center.update" | translate }}
</button>
<button mat-raised-button id="cancel" (click)="cancel()">
Expand Down

0 comments on commit c42b14b

Please sign in to comment.