4e0e641002
The system validates the input of the users. In most cases, if a form is invalid, the user has no chance to save his changes.
69 lines
2.3 KiB
HTML
69 lines
2.3 KiB
HTML
<mat-toolbar color="primary" [ngClass]="multiSelectMode ? 'multi-select' : ''" class="sticky-toolbar">
|
|
<div class="toolbar-left">
|
|
<!-- Nav menu -->
|
|
<button mat-icon-button *ngIf="vp.isMobile && !showBackButton && !editMode" (click)="clickHamburgerMenu()">
|
|
<mat-icon>menu</mat-icon>
|
|
</button>
|
|
|
|
<!-- Exit / Back button -->
|
|
<button mat-icon-button *ngIf="showBackButton && !editMode" (click)="onBackButton()">
|
|
<mat-icon>arrow_back</mat-icon>
|
|
</button>
|
|
|
|
<!-- Cancel edit button -->
|
|
<button mat-icon-button *ngIf="editMode" (click)="sendMainEvent()">
|
|
<mat-icon>close</mat-icon>
|
|
</button>
|
|
|
|
<div class="toolbar-left-text" *ngIf="!multiSelectMode">
|
|
<!-- Title slot -->
|
|
<ng-content select=".title-slot"></ng-content>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- centered information slot -->
|
|
<div *ngIf="!multiSelectMode" class="spacer"></div>
|
|
<div class="toolbar-centered" *ngIf="multiSelectMode">
|
|
<ng-content select=".central-info-slot"></ng-content>
|
|
</div>
|
|
<div class="spacer"></div>
|
|
|
|
<div class="toolbar-right">
|
|
<!-- Extra controls slot -->
|
|
<ng-content select=".extra-controls-slot"></ng-content>
|
|
|
|
<!-- Main action button - desktop -->
|
|
<button
|
|
mat-icon-button
|
|
*ngIf="mainButtonIcon == 'add' && mainButton && !editMode && !vp.isMobile && !multiSelectMode"
|
|
(click)="sendMainEvent()"
|
|
>
|
|
<mat-icon>add_circle</mat-icon>
|
|
</button>
|
|
<button
|
|
mat-icon-button
|
|
*ngIf="mainButtonIcon == 'edit' && mainButton && !editMode && !vp.isMobile && !multiSelectMode"
|
|
(click)="sendMainEvent()"
|
|
>
|
|
<mat-icon>edit</mat-icon>
|
|
</button>
|
|
|
|
<!-- Save button -->
|
|
<button mat-button *ngIf="editMode" [disabled]="!isSaveButtonEnabled" (click)="save()"><strong translate class="upper">Save</strong></button>
|
|
|
|
<!-- Menu button slot -->
|
|
<ng-content *ngIf="!editMode" select=".menu-slot"></ng-content>
|
|
</div>
|
|
</mat-toolbar>
|
|
|
|
<!-- Main action button - mobile -->
|
|
|
|
<button
|
|
mat-fab
|
|
class="head-button "
|
|
*ngIf="mainButton && !editMode && vp.isMobile && !multiSelectMode"
|
|
(click)="sendMainEvent()"
|
|
>
|
|
<mat-icon>{{ mainButtonIcon }}</mat-icon>
|
|
</button>
|