2019-08-01 09:54:40 +02:00
|
|
|
<div class="grant-editor">
|
2019-03-05 12:21:04 +01:00
|
|
|
|
2019-08-28 15:53:17 +02:00
|
|
|
<form *ngIf="grantformGroup" [formGroup]="grantformGroup">
|
2019-03-01 16:16:21 +01:00
|
|
|
<mat-card>
|
2019-08-28 15:53:17 +02:00
|
|
|
<mat-card-header></mat-card-header>
|
2019-03-01 16:16:21 +01:00
|
|
|
<mat-card-content>
|
2019-08-28 15:53:17 +02:00
|
|
|
<!-- <div *ngIf="funderFormGroup">
|
|
|
|
<app-quick-wizard-funder-editor-component class="col-12" [formGroup]="funderFormGroup"></app-quick-wizard-funder-editor-component>
|
|
|
|
</div> -->
|
2019-03-05 12:21:04 +01:00
|
|
|
<div class="row" *ngIf="!isNew">
|
2019-08-28 15:53:17 +02:00
|
|
|
<p class="col-md-12"><b>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.ABOUT-GRANT' | translate}}</b></p>
|
2019-06-26 12:51:16 +02:00
|
|
|
<mat-form-field class="col-md-12 mt-2">
|
2019-08-28 15:53:17 +02:00
|
|
|
<app-single-auto-complete required='true' [formControl]="grantformGroup.get('existGrant')" placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.SELECT-GRANT' | translate}}" [configuration]="grantAutoCompleteConfiguration">
|
2019-03-05 12:21:04 +01:00
|
|
|
</app-single-auto-complete>
|
2019-10-04 18:11:52 +02:00
|
|
|
<mat-hint>{{'DMP-EDITOR.FIELDS.EXTERNAL-SOURCE-HINT' | translate}}</mat-hint>
|
2019-08-28 15:53:17 +02:00
|
|
|
<mat-error *ngIf="grantformGroup.hasError('backendError')">
|
|
|
|
{{grantformGroup.get('grant').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="grantformGroup.hasError('required')">
|
2019-03-05 12:21:04 +01:00
|
|
|
{{'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">
|
2019-08-28 15:53:17 +02:00
|
|
|
<p class="col-md-12"><b>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.ABOUT-NEW-GRANT' | translate}}</b></p>
|
2019-03-05 12:21:04 +01:00
|
|
|
<mat-form-field class="col-md-12">
|
2019-08-28 15:53:17 +02:00
|
|
|
<input matInput placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.GRANT-LABEL' | translate}}" type="text" name="label" [formControl]="grantformGroup.get('label')" required>
|
2019-06-26 09:39:25 +02:00
|
|
|
<mat-hint>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.LABEL-HINT' | translate}}</mat-hint>
|
2019-08-28 15:53:17 +02:00
|
|
|
<mat-error *ngIf="grantformGroup.get('label').hasError('backendError')">
|
|
|
|
{{grantformGroup.get('label').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="grantformGroup.get('label').hasError('required')">
|
2019-03-05 12:21:04 +01:00
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2019-03-01 16:16:21 +01:00
|
|
|
</mat-form-field>
|
2019-06-26 09:39:25 +02:00
|
|
|
<mat-form-field class="col-md-12 mt-2">
|
2019-08-28 15:53:17 +02:00
|
|
|
<textarea matInput class="description-area" placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.DESCRIPTION' | translate}}" [formControl]="grantformGroup.get('description')" required></textarea>
|
2019-06-26 09:39:25 +02:00
|
|
|
<mat-hint>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.DESCRIPTION-HINT' | translate}}</mat-hint>
|
2019-08-28 15:53:17 +02:00
|
|
|
<mat-error *ngIf="grantformGroup.get('description').hasError('backendError')">
|
|
|
|
{{grantformGroup.get('description').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="grantformGroup.get('description').hasError('required')">
|
2019-03-05 12:21:04 +01:00
|
|
|
{{'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">
|
2019-06-26 12:51:16 +02:00
|
|
|
<div class="align-self-center mt-2 col">
|
2019-03-05 12:21:04 +01:00
|
|
|
<hr>
|
|
|
|
</div>
|
|
|
|
<h3 class="col-auto">
|
|
|
|
{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.OR' | translate}}
|
|
|
|
</h3>
|
2019-06-26 12:51:16 +02:00
|
|
|
<div class="align-self-center mt-2 col">
|
2019-03-05 12:21:04 +01:00
|
|
|
<hr>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col"></div>
|
|
|
|
|
2019-10-04 18:11:52 +02:00
|
|
|
<button mat-raised-button class="col-auto" color="primary" type="button" *ngIf="!isNew" [disabled]="isFunderFormInvalid()" (click)="create()">{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.CREATE-NEW-GRANT' | translate}}</button>
|
2019-08-28 15:53:17 +02:00
|
|
|
<button mat-raised-button class="col-auto" color="primary" type="button" *ngIf="isNew" (click)="create()">{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.EXIST-GRANT' | translate}}</button>
|
2019-03-05 12:21:04 +01:00
|
|
|
|
|
|
|
<div class="col"></div>
|
|
|
|
</div>
|
|
|
|
|
2019-03-01 16:16:21 +01:00
|
|
|
</mat-card-content>
|
|
|
|
</mat-card>
|
|
|
|
</form>
|
2019-06-26 09:39:25 +02:00
|
|
|
</div>
|