diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html index 9a4d84a58c240ef460c7edd301c61d34af11e2fc..6a4876b571b7a370a9a2f5ef726b7e4c88a287e8 100644 --- a/src/app/login/login.component.html +++ b/src/app/login/login.component.html @@ -3,17 +3,16 @@ <mat-form-field class="input-block"> <input matInput #userEmail placeholder="E-mail" [formControl]="usernameFormControl" [errorStateMatcher]="matcher" name="username"/> - <mat-error *ngIf="usernameFormControl.hasError('email') && !usernameFormControl.hasError('required')">Please enter a <strong>valid</strong> e-mail address. + <mat-error *ngIf="usernameFormControl.hasError('email') && !usernameFormControl.hasError('required')">Please enter a + <strong>valid</strong> e-mail address. </mat-error> <mat-error *ngIf="usernameFormControl.hasError('required')">E-mail is <strong>required</strong>.</mat-error> </mat-form-field> - <mat-form-field class="input-block"> <input matInput #userPassword type="password" placeholder="Password" [formControl]="passwordFormControl" [errorStateMatcher]="matcher" name="password"/> <mat-error *ngIf="passwordFormControl.hasError('required')">Password is <strong>required</strong>.</mat-error> </mat-form-field> - <button mat-raised-button color="primary" type="submit">Login</button> <button mat-raised-button *ngIf="role === UserRole.PARTICIPANT" (click)="guestLogin()">Login as guest diff --git a/src/app/room-creation/room-creation.component.html b/src/app/room-creation/room-creation.component.html index 958436491bf2038ecaf04c8268af47758ef8d678..d930026e1f8bf5f72540fa1b4382c2da9ef8e403 100644 --- a/src/app/room-creation/room-creation.component.html +++ b/src/app/room-creation/room-creation.component.html @@ -1,6 +1,7 @@ <div fxLayout="column" fxLayoutAlign="center" fxLayoutGap="10px"> <mat-form-field> - <input (keypress)="resetEmptyInputs()" matInput #longRoomName class="input-block" type="text" placeholder="Name" maxlength="50" + <input (keypress)="resetEmptyInputs()" matInput #longRoomName class="input-block" type="text" placeholder="Name" + maxlength="50" [(ngModel)]="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> @@ -9,9 +10,9 @@ <mat-icon>close</mat-icon> </button> </mat-form-field> - <mat-form-field> - <input (keypress)="resetEmptyInputs()" matInput #shortRoomName class="input-block" type="text" placeholder="Short name" maxlength="8" + <input (keypress)="resetEmptyInputs()" matInput #shortRoomName class="input-block" type="text" + placeholder="Short name" maxlength="8" [(ngModel)]="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> diff --git a/src/app/room-creation/room-creation.component.ts b/src/app/room-creation/room-creation.component.ts index cc79c96efce93d73e2136ecd734d236e399929a5..ffb25d98e74d5820a7e63ba81e079b14c92e88fa 100644 --- a/src/app/room-creation/room-creation.component.ts +++ b/src/app/room-creation/room-creation.component.ts @@ -28,6 +28,7 @@ export class RoomCreationComponent implements OnInit { ngOnInit() { } + resetEmptyInputs(): void { this.emptyInputs = false; }