Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cancel Button to Assessment Password Encryption Dialog #3698

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-------------------------->
<div class="d-flex flex-column justify-content-center flex-11a">
<div *transloco="let t" class="d-flex flex-column justify-content-center flex-11a">
<div class="mat-dialog-header p-3 d-flex justify-content-start align-items-center flex-00a">
<span class="mr-3 fs-base-6 cset-icons-exclamation-triangle" aria-label="charter-warning"></span>
<span>{{ dialogTitle }}</span>
</div>

<mat-dialog-content class="pt-3 pl-3 pr-3 d-flex flex-column flex-11a">
<p>To encrypt your assessment, please enter a password.</p>
<p>To encrypt your assessment, please enter a password.</p>
<p>If you proceed without entering a password, no encryption will be used.</p>

<div class="input-container ml-1 mr-1">
Expand All @@ -40,13 +40,14 @@
<i class="fas fa-eye-slash"></i>
</div>

<input type="text" tabindex="0" class="form-control mt-4" name="passwordHint" placeholder="Password Hint (Optional)"
<input type="text" tabindex="0" class="form-control mt-4" name="passwordHint" placeholder="Password Hint (Optional)"
[(ngModel)]="passwordHint" />
</div>
</mat-dialog-content>

<mat-dialog-actions class="p-3 pt-0 mb-0 d-flex justify-content-end flex-11a">
<button class="btn btn-secondary" (click)="confirm()">Continue</button>
<mat-dialog-actions class="p-3 pt-0 mb-0 d-flex justify-content-between flex-11a">
<button class="m-0 btn btn-secondary" (click)="cancel()">{{ t('buttons.cancel') }}</button>
<button class="btn btn-secondary" (click)="confirm()">{{ t('buttons.continue') }}</button>
</mat-dialog-actions>

</div>
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export class ExportPasswordComponent {
this.dialogRef.close(this.encryptionData);
}

cancel() {
this.dialogRef.close();
}

togglePasswordVisibility() {
this.showPassword = !this.showPassword;
}
Expand Down
46 changes: 23 additions & 23 deletions CSETWebNg/src/app/dialogs/edit-user/edit-user.component.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<!----------------------
<!----------------------

Copyright 2023 Battelle Energy Alliance, LLC
Copyright 2023 Battelle Energy Alliance, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-------------------------->
<div class="edit-user-dialog d-flex flex-column justify-content-center flex-11a">
<div *transloco="let t" class="edit-user-dialog d-flex flex-column justify-content-center flex-11a">
<div class="mat-dialog-header p-3 d-flex justify-content-start align-items-center flex-00a">
<span class="cset-icons-profile fs-base-6 mr-3"></span>
<span>User Profile</span>
Expand Down Expand Up @@ -105,9 +105,9 @@ <h4>Security Questions</h4>
</div>

<mat-dialog-actions class="p-3 pt-0 mb-0 d-flex justify-content-between flex-11a">
<button class="m-0 btn btn-primary">Save</button>
<button class="m-0 btn btn-secondary" (click)="cancel()">Cancel</button>
<button class="m-0 btn btn-primary">{{ t('buttons.save') }}</button>
<button class="m-0 btn btn-secondary" (click)="cancel()">{{ t('buttons.cancel') }}</button>
</mat-dialog-actions>
</form>
</mat-dialog-content>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
SOFTWARE.
-------------------------->
<input type="file" #file style="display: none" (change)="onFilesAdded()" />
<div class="upload-export d-flex flex-column flex-11a">
<div *transloco="let t" class="upload-export d-flex flex-column flex-11a">
<div class="mat-dialog-header p-3 d-flex justify-content-start flex-11a">{{ appCode }} File Import</div>
<h4 style="position: sticky; top: 0; padding-top: 15px; padding-left: 15px;" class="mb-2 c-primary">Uploading Files</h4>
<mat-dialog-content class="oy-auto p-3 pr-0 d-flex flex-column flex-00a">
Expand All @@ -46,9 +46,9 @@ <h4 style="position: sticky; top: 0; padding-top: 15px; padding-left: 15px;" cla
<!-- <button class="btn btn-primary" [disabled]="!canBeClosed" (click)="closeDialog()">{{primaryButtonText}}</button>
<button class="btn btn-secondary" *ngIf="showCancelButton" mat-dialog-close>Cancel</button> -->
<button class="btn btn-secondary" *ngIf="showCancelButton && data.isCsafUpload" (click)="cancelUpload()"
[disabled]="canBeClosed">Cancel</button>
<button class="btn btn-secondary" *ngIf="canBeClosed" (click)="closeDialog()">Cancel</button>
<button class="btn btn-primary" *ngIf="passwordRequired" (click)="enterPassword()">Enter Password</button>
[disabled]="canBeClosed">{{ t('buttons.cancel') }}</button>
<button class="btn btn-secondary" *ngIf="canBeClosed" (click)="closeDialog()">{{ t('buttons.cancel') }}</button>
<button class="btn btn-primary" *ngIf="passwordRequired" (click)="enterPassword()">{{ t('buttons.enter password') }}</button>
</mat-dialog-actions>
</div>
</div>
Expand Down
Loading