From 46c9bd2da9915418ad9e2b4b738dc433c89d87dd Mon Sep 17 00:00:00 2001 From: Heinrich Marks <heinrich.marks@mni.thm.de> Date: Mon, 12 Mar 2018 21:38:46 +0100 Subject: [PATCH] Adjust HTML --- .../content-creation.component.html | 18 +++++++++++++----- .../room-creation/room-creation.component.html | 4 ++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/app/content-creation/content-creation.component.html b/src/app/content-creation/content-creation.component.html index 0b118d23f..c48a4155b 100644 --- a/src/app/content-creation/content-creation.component.html +++ b/src/app/content-creation/content-creation.component.html @@ -1,12 +1,20 @@ -<form (ngSubmit)="addContent(subjectTitle.value, bodyText.value)"> +<form (ngSubmit)="addContent(subjectTitle.value, bodyText.value, contentRound.value)"> <div fxLayout="column" fxLayoutAlign="center" fxLayoutGap="10px"> <mat-form-field> - <input class="input-block" #subjectTitle matInput (keypress)="resetEmptyInputs()" placeholder="Subject" [(ngModel)]="subject"> + <input class="input-block" #subjectTitle matInput (keypress)="resetEmptyInputs()" placeholder="Subject" [(ngModel)]="subject" + name="Title"> + <button mat-button *ngIf="subject" type="text" matSuffix mat-icon-button aria-label="Clear" (click)="subject=''"> + <mat-icon>close</mat-icon> + </button> </mat-form-field> <mat-form-field> - <input class="input-block" #bodyText matInput matTextareaAutosize matAutosizeMinRows="3" matAutosizeMaxRows="8" (keypress)="resetEmptyInputs()" - placeholder="Body" [(ngModel)]="body"> - <button mat-button matSuffix mat-icon-button aria-label="Clear" (click)="subject=''; body=''"> + <input class="input-block" #contentRound matInput (keypress)="resetEmptyInputs()" placeholder="Round" [(ngModel)]="round" + name="Round"> + </mat-form-field> + <mat-form-field> + <textarea #bodyText matInput matTextareaAutosize matAutosizeMinRows="3" matAutosizeMaxRows="8" (keypress)="resetEmptyInputs()" + placeholder="Body" [(ngModel)]="body" name="Text"></textarea> + <button mat-button *ngIf="body" type="text" matSuffix mat-icon-button aria-label="Clear" (click)="body=''"> <mat-icon>close</mat-icon> </button> </mat-form-field> diff --git a/src/app/room-creation/room-creation.component.html b/src/app/room-creation/room-creation.component.html index 75666e536..de6761740 100644 --- a/src/app/room-creation/room-creation.component.html +++ b/src/app/room-creation/room-creation.component.html @@ -3,7 +3,7 @@ <mat-form-field> <input (keypress)="resetEmptyInputs()" matInput #longRoomName class="input-block" type="text" placeholder="Name" maxlength="50" - [(ngModel)]="longName"/> + [(ngModel)]="longName" name="LongName"/> <mat-hint align="start" *ngIf="!emptyInputs"><strong>Max. letters / signs:</strong></mat-hint> <mat-hint align="end" *ngIf="!emptyInputs">{{longRoomName.value.length}} / 50</mat-hint> <mat-hint align="start" *ngIf="emptyInputs"><strong>Input is required</strong></mat-hint> @@ -14,7 +14,7 @@ <mat-form-field> <input (keypress)="resetEmptyInputs()" matInput #shortRoomName class="input-block" type="text" placeholder="Short name" maxlength="8" - [(ngModel)]="shortName"/> + [(ngModel)]="shortName" name="ShortName"/> <mat-hint align="start" *ngIf="!emptyInputs"><strong>Max. letters / signs:</strong></mat-hint> <mat-hint align="end" *ngIf="!emptyInputs">{{shortRoomName.value.length}} / 8</mat-hint> <mat-hint align="start" *ngIf="emptyInputs"><strong>Input is required</strong></mat-hint> -- GitLab