Skip to content

Commit

Permalink
#166 added checkbox
Browse files Browse the repository at this point in the history
Signed-off-by: Karol Bakas <karol.bakas@fau.de>
  • Loading branch information
Idontker committed Jun 25, 2022
1 parent 4502f05 commit 91261f8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { MatMenuModule } from '@angular/material/menu';

import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatNativeDateModule } from '@angular/material/core';
import { MatCheckboxModule } from '@angular/material/checkbox';

//module for DD/MM/YYYY date format
import { MAT_DATE_LOCALE } from '@angular/material/core';
Expand All @@ -29,6 +30,7 @@ const MaterialComponents = [
MatDialogModule,
MatTabsModule,
MatMenuModule,
MatCheckboxModule,
];
const MaterialDatePicker = [MatDatepickerModule, MatNativeDateModule];
@NgModule({
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.mat-dialog-content {
overflow: hidden;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
<h1 mat-dialog-title>Delete file</h1>
<div mat-dialog-content>Are you sure you want to delete</div>
<div mat-dialog-content>
<p>Are you sure you want to delete?</p>
<mat-checkbox color="warn" [(ngModel)]="sure">Yes, I am sure!</mat-checkbox>
</div>
<div mat-dialog-actions>
<button mat-button primary mat-dialog-close>No</button>
<button mat-button mat-dialog-close (mousedown)="deleteEvent()">Yes</button>
<button mat-button mat-dialog-close>No</button>
<button
mat-raised-button
mat-dialog-close
color="warn"
(mousedown)="deleteEvent()"
[disabled]="!this.sure"
>
Yes
</button>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export class DeleteDialogComponent implements OnInit {
text: string = '';
id: any = '';

sure: boolean = false;

deleteRequest: (arg0: any) => void = (arg0) => {};

constructor(
Expand Down

0 comments on commit 91261f8

Please sign in to comment.