61 lines
2.3 KiB
HTML
61 lines
2.3 KiB
HTML
<div class="container-fluid">
|
|
<div class="row description-template-type-editor">
|
|
<div class="col-md-10 offset-md-1 colums-gapped">
|
|
|
|
<div class="row justify-content-between align-items-center mb-4 mt-4">
|
|
<div class="col">
|
|
<app-navigation-breadcrumb />
|
|
</div>
|
|
|
|
<div class="col-auto">
|
|
<button mat-button class="action-btn" (click)="cancel()" type="button">{{'DESCRIPTION-TEMPLATE-TYPE-EDITOR.ACTIONS.CANCEL' | translate}}</button>
|
|
</div>
|
|
<div class="col-auto" *ngIf="canDelete">
|
|
<button mat-button (click)="delete()" class="action-btn" type="button">
|
|
<mat-icon>delete</mat-icon>
|
|
{{'DESCRIPTION-TEMPLATE-TYPE-EDITOR.ACTIONS.DELETE' | translate}}
|
|
</button>
|
|
</div>
|
|
<div class="col-auto" *ngIf="canFinalize">
|
|
<button mat-button class="action-btn" (click)="finalize(); formSubmit()">
|
|
<mat-icon>save</mat-icon>
|
|
{{'DESCRIPTION-TEMPLATE-TYPE-EDITOR.ACTIONS.FINALIZE' | translate}}
|
|
</button>
|
|
</div>
|
|
<div class="col-auto" *ngIf="canSave">
|
|
<button mat-button class="action-btn" (click)="save(); formSubmit()">
|
|
<mat-icon>save</mat-icon>
|
|
{{'DESCRIPTION-TEMPLATE-TYPE-EDITOR.ACTIONS.SAVE' | translate}}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<mat-card appearance="outlined">
|
|
<mat-card-header>
|
|
<mat-card-title *ngIf="isNew">{{'DESCRIPTION-TEMPLATE-TYPE-EDITOR.NEW' | translate}}</mat-card-title>
|
|
</mat-card-header>
|
|
<mat-card-content>
|
|
<form (ngSubmit)="formSubmit()" [formGroup]="formGroup" *ngIf="formGroup">
|
|
<div class="row">
|
|
<div class="col-12 pt-1 pb-1">
|
|
<span>
|
|
{{'DESCRIPTION-TEMPLATE-TYPE-EDITOR.FIELDS.NAME' | translate}}
|
|
</span>
|
|
</div>
|
|
<div class="col-12 mt-1">
|
|
<mat-form-field class="w-100">
|
|
<input matInput placeholder="{{'DESCRIPTION-TEMPLATE-TYPE-EDITOR.FIELDS.NAME' | translate}}" type="text" name="name" [formControl]="formGroup.get('name')" required>
|
|
<mat-error *ngIf="formGroup.get('name').hasError('backendError')">
|
|
{{formGroup.get('name').getError('backendError').message}}</mat-error>
|
|
<mat-error *ngIf="formGroup.get('name').hasError('required')">
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
</mat-form-field>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</mat-card-content>
|
|
</mat-card>
|
|
</div>
|
|
</div>
|
|
</div>
|