argos/dmp-frontend/src/app/ui/contact/contact-content/contact-content.component.html

34 lines
1.9 KiB
HTML
Raw Normal View History

2019-11-11 11:42:55 +01:00
<form class="form" [formGroup]="formGroup">
<div [ngClass]="{'container contact-component': !isDialog}">
<div *ngIf="!isDialog" class="row">
<div class="col-md-12">
<h1>{{ 'CONTACT.SUPPORT.TITLE' | translate}}</h1>
2019-11-11 11:42:55 +01:00
</div>
</div>
<div [ngClass]="{'contact-container': !isDialog}" class="row">
<div class="col-md-12">
<mat-form-field class="full-width mb-2">
<!-- <input matInput placeholder="{{'CONTACT.SUPPORT.SUBJECT' | translate}}" [(ngModel)]="formGroup.subject" name="contactSupportSubject" required> -->
<input matInput placeholder="{{'CONTACT.SUPPORT.SUBJECT' | translate}}" type="text" name="subject" formControlName="subject" required>
<mat-error *ngIf="formGroup.get('subject').hasError('backendError')">
{{formGroup.get('subject').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('subject').hasError('required')">
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
<mat-form-field class="full-width">
<textarea matInput placeholder="{{'CONTACT.SUPPORT.DESCRIPTION' | translate}}" type="text" name="description" formControlName="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>
</mat-form-field>
</div>
</div>
<div *ngIf="!isDialog" class="row contact-actions">
<div class="ml-auto col-auto"><button mat-raised-button type="button" (click)="cancel()">{{'CONTACT.SUPPORT.CANCEL' | translate}}</button></div>
<div class="col-auto"><button mat-raised-button color="primary" type="button" [disabled]="!formGroup.valid" (click)="send()"><i class="fa fa-paper-plane pr-2"></i>{{'CONTACT.SUPPORT.SEND' | translate}}</button></div>
</div>
</div>
</form>