Skip to content

Commit

Permalink
improved layout of feedback form (increase vertical spacing)
Browse files Browse the repository at this point in the history
  • Loading branch information
saschaszott authored Jan 25, 2024
1 parent c02b46c commit a238a28
Showing 1 changed file with 29 additions and 30 deletions.
59 changes: 29 additions & 30 deletions src/app/info/feedback/feedback-form/feedback-form.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,42 @@
<form class="primary" [formGroup]="feedbackForm" (ngSubmit)="createFeedback()">
<h1>{{ 'info.feedback.head' | translate }}</h1>
<p>{{ 'info.feedback.info' | translate }}</p>
<fieldset class="col p-0">
<div class="row">
<div class="control-group col-sm-12">
<label class="control-label" for="email">{{ 'info.feedback.email-label' | translate }}&nbsp;</label>
<input id="email" class="form-control" name="email" type="text" value="" formControlName="email" autofocus="autofocus" title="{{ 'info.feedback.email_help' | translate }}">
<small class="text-muted">{{ 'info.feedback.email_help' | translate }}</small>
</div>
<div class="row mt-3">
<div class="control-group col-sm-12">
<label class="control-label" for="email">{{ 'info.feedback.email-label' | translate }}&nbsp;</label>
<input id="email" class="form-control" name="email" type="text" value="" formControlName="email" autofocus="autofocus" title="{{ 'info.feedback.email_help' | translate }}">
<small class="text-muted">{{ 'info.feedback.email_help' | translate }}</small>
</div>

<ng-container *ngIf="feedbackForm.controls.email.invalid && (feedbackForm.controls.email.dirty || feedbackForm.controls.email.touched)"
class="alert">
</div>
<div *ngIf="feedbackForm.controls.email.invalid && (feedbackForm.controls.email.dirty || feedbackForm.controls.email.touched)" class="row">
<div class="col-sm-12 alert">
<ds-error *ngIf="feedbackForm.controls.email.errors?.required" message="{{'info.feedback.error.email.required' | translate}}"></ds-error>
<ds-error *ngIf="feedbackForm.controls.email.errors?.pattern" message="{{'info.feedback.error.email.required' | translate}}"></ds-error>
</ng-container>
<div class="row">
<div class="control-group col-sm-12">
<label class="control-label" for="comments">{{ 'info.feedback.comments' | translate }}:&nbsp;</label>
<textarea id="comments" formControlName="message" class="form-control" name="message" cols="20" rows="5"> </textarea>
</div>
</div>
<ng-container *ngIf="feedbackForm.controls.message.invalid && (feedbackForm.controls.message.dirty || feedbackForm.controls.message.touched)"
class="alert">
</div>
<div class="row mt-3">
<div class="control-group col-sm-12">
<label class="control-label" for="comments">{{ 'info.feedback.comments' | translate }}&nbsp;</label>
<textarea id="comments" formControlName="message" class="form-control" name="message" cols="20" rows="5"> </textarea>
</div>
</div>
<div *ngIf="feedbackForm.controls.message.invalid && (feedbackForm.controls.message.dirty || feedbackForm.controls.message.touched)" class="row">
<div class="col-sm-12 alert">
<ds-error *ngIf="feedbackForm.controls.message.errors?.required" message="{{'info.feedback.error.message.required' | translate}}"></ds-error>
</ng-container>
<div class="row">
<div class="control-group col-sm-12">
<label class="control-label" for="page">{{ 'info.feedback.page-label' | translate }}&nbsp;</label>
<input id="page" readonly class="form-control" name="page" type="text" value="" formControlName="page" autofocus="autofocus" title="{{ 'info.feedback.page_help' | translate }}">
<small class="text-muted">{{ 'info.feedback.page_help' | translate }}</small>
</div>
</div>
<div class="row py-2">
<div class="control-group col-sm-12 text-right">
<button [disabled]="!feedbackForm.valid" class="btn btn-primary" name="submit" type="submit">{{ 'info.feedback.send' | translate }}</button>
</div>
</div>
<div class="row mt-3">
<div class="control-group col-sm-12">
<label class="control-label" for="page">{{ 'info.feedback.page-label' | translate }}&nbsp;</label>
<input id="page" readonly class="form-control" name="page" type="text" value="" formControlName="page" autofocus="autofocus" title="{{ 'info.feedback.page_help' | translate }}">
<small class="text-muted">{{ 'info.feedback.page_help' | translate }}</small>
</div>
</div>
<div class="row mt-3">
<div class="control-group col-sm-12 text-right">
<button [disabled]="!feedbackForm.valid" class="btn btn-primary" name="submit" type="submit">{{ 'info.feedback.send' | translate }}</button>
</div>
</fieldset>
</div>
</form>
</div>
</div>

0 comments on commit a238a28

Please sign in to comment.