2018-05-11 18:22:59 +02:00
|
|
|
<form class="awardee-form" (ngSubmit)="saveAwardee()">
|
2018-05-10 16:39:05 +02:00
|
|
|
<mat-form-field class="full-width">
|
2018-05-11 18:22:59 +02:00
|
|
|
<input name="name" type="text" matInput placeholder="Display name" [(ngModel)]="awardee.name">
|
2018-05-10 16:39:05 +02:00
|
|
|
</mat-form-field>
|
2018-05-13 22:35:37 +02:00
|
|
|
<div class="image-preview-zone">
|
|
|
|
|
<img [src]="profileImage" class="profile-image mat-elevation-z10" [class.tobe-replaced]="rawProfileImage"
|
|
|
|
|
*ngIf="awardee.hasProfileImage">
|
|
|
|
|
<img [src]="rawProfileImage" class="profile-image mat-elevation-z10 clickable" *ngIf="rawProfileImage"
|
|
|
|
|
(click)="undoImageSelect(profileImageUpload)" matTooltip="Remove image">
|
|
|
|
|
</div>
|
|
|
|
|
<input #profileImageUpload id="profileImageUpload" type="file" accept="image/*" hidden (change)="profileImageSelectionChange()">
|
|
|
|
|
<label for="profileImageUpload" class="mat-raised-button">
|
|
|
|
|
<i class="far fa-image"></i> Upload profile image
|
|
|
|
|
</label>
|
|
|
|
|
|
2018-05-10 16:39:05 +02:00
|
|
|
<mat-divider></mat-divider>
|
|
|
|
|
<mat-form-field class="full-width">
|
2018-05-11 18:22:59 +02:00
|
|
|
<mat-select name="year" placeholder="Year" [(ngModel)]="awardee.year">
|
2018-05-11 10:46:27 +02:00
|
|
|
<mat-option *ngFor="let year of years" [value]="year">{{ year }}</mat-option>
|
2018-05-10 16:39:05 +02:00
|
|
|
</mat-select>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
|
|
|
|
|
<mat-form-field class="full-width">
|
2018-05-11 18:22:59 +02:00
|
|
|
<textarea name="text" matInput placeholder="Article text" rows="10" [(ngModel)]="awardee.text"></textarea>
|
2018-05-10 16:39:05 +02:00
|
|
|
</mat-form-field>
|
2018-05-13 22:35:37 +02:00
|
|
|
<div class="image-preview-zone">
|
|
|
|
|
<img [src]="awardImage" class="award-image mat-elevation-z10" [class.tobe-replaced]="rawAwardImage"
|
|
|
|
|
*ngIf="awardee.hasAwardImage">
|
|
|
|
|
<img [src]="rawAwardImage" class="award-image mat-elevation-z10 clickable" *ngIf="rawAwardImage"
|
|
|
|
|
(click)="undoImageSelect(awardImageUpload)" matTooltip="Remove image">
|
|
|
|
|
</div>
|
|
|
|
|
<input #awardImageUpload id="awardImageUpload" type="file" accept="image/*" hidden (change)="awardImageSelectionChange()">
|
|
|
|
|
<label for="awardImageUpload" class="mat-raised-button">
|
2018-05-10 16:39:05 +02:00
|
|
|
<i class="far fa-image"></i> Upload article image
|
2018-05-13 22:35:37 +02:00
|
|
|
</label>
|
2018-05-10 16:39:05 +02:00
|
|
|
<mat-divider></mat-divider>
|
|
|
|
|
|
|
|
|
|
<mat-form-field class="full-width">
|
2018-05-11 18:22:59 +02:00
|
|
|
<input name="imageLabel" type="text" matInput placeholder="Image label" [(ngModel)]="awardee.imageLabel">
|
2018-05-10 16:39:05 +02:00
|
|
|
</mat-form-field>
|
|
|
|
|
|
2018-05-11 18:22:59 +02:00
|
|
|
<button type="submit" mat-raised-button color="accent" [disabled]="!canSave">
|
2018-05-10 16:39:05 +02:00
|
|
|
<i class="fas fa-save"></i> Save
|
|
|
|
|
</button>
|
|
|
|
|
</form>
|