2019-03-01 16:16:21 +01:00
|
|
|
<div class="project-editor">
|
2019-03-05 12:21:04 +01:00
|
|
|
|
|
|
|
<form *ngIf="formGroup" [formGroup]="formGroup">
|
2019-03-01 16:16:21 +01:00
|
|
|
<mat-card>
|
|
|
|
<mat-card-header>
|
2019-03-05 12:21:04 +01:00
|
|
|
|
2019-03-01 16:16:21 +01:00
|
|
|
</mat-card-header>
|
|
|
|
<mat-card-content>
|
2019-03-05 12:21:04 +01:00
|
|
|
<div class="row" *ngIf="!isNew">
|
2019-03-01 16:16:21 +01:00
|
|
|
<mat-form-field class="col-md-12">
|
2019-03-05 12:21:04 +01:00
|
|
|
<app-single-auto-complete required='true' [formControl]="formGroup.get('existProject')"
|
|
|
|
placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.SELECT-PROJECT' | translate}}"
|
|
|
|
[configuration]="projectAutoCompleteConfiguration">
|
|
|
|
</app-single-auto-complete>
|
|
|
|
<mat-error *ngIf="formGroup.hasError('backendError')">
|
|
|
|
{{formGroup.get('project').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="formGroup.hasError('required')">
|
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2019-03-01 16:16:21 +01:00
|
|
|
</mat-form-field>
|
2019-03-05 12:21:04 +01:00
|
|
|
</div>
|
2019-03-01 16:16:21 +01:00
|
|
|
|
2019-03-05 12:21:04 +01:00
|
|
|
<div class="row" *ngIf="isNew">
|
|
|
|
<mat-form-field class="col-md-12">
|
|
|
|
<input matInput
|
|
|
|
placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.LABEL' | translate}}"
|
|
|
|
type="text" name="label" [formControl]="formGroup.get('label')" required>
|
|
|
|
<mat-error *ngIf="formGroup.get('label').hasError('backendError')">
|
|
|
|
{{formGroup.get('label').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="formGroup.get('label').hasError('required')">
|
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2019-03-01 16:16:21 +01:00
|
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="col-md-12">
|
2019-03-05 12:21:04 +01:00
|
|
|
<textarea matInput class="description-area"
|
|
|
|
placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.DESCRIPTION' | translate}}"
|
|
|
|
[formControl]="formGroup.get('description')" required></textarea>
|
|
|
|
<mat-error *ngIf="formGroup.get('description').hasError('backendError')">
|
|
|
|
{{formGroup.get('description').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="formGroup.get('description').hasError('required')">
|
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2019-03-01 16:16:21 +01:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
2019-03-05 12:21:04 +01:00
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
|
|
|
<hr>
|
|
|
|
</div>
|
|
|
|
<h3 class="col-auto">
|
|
|
|
{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.OR' | translate}}
|
|
|
|
</h3>
|
|
|
|
<div class="col">
|
|
|
|
<hr>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col"></div>
|
|
|
|
|
|
|
|
<button mat-raised-button class="col-auto" color="primary" type="button" *ngIf="!isNew"
|
|
|
|
(click)="create()">{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.CREATE-NEW' | translate}}</button>
|
|
|
|
<button mat-raised-button class="col-auto" color="primary" type="button" *ngIf="isNew"
|
|
|
|
(click)="create()">{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.EXIST' | translate}}</button>
|
|
|
|
|
|
|
|
<div class="col"></div>
|
|
|
|
</div>
|
|
|
|
|
2019-03-01 16:16:21 +01:00
|
|
|
</mat-card-content>
|
|
|
|
</mat-card>
|
|
|
|
</form>
|
2019-03-05 12:21:04 +01:00
|
|
|
</div>
|