Skip to content
Snippets Groups Projects
Commit 884d0517 authored by Thomas Lenz's avatar Thomas Lenz
Browse files

Reformat code

parent 6f4ee2c7
Branches
No related merge requests found
Pipeline #13153 passed with stage
in 35 seconds
......@@ -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
......
<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>
......
......@@ -28,6 +28,7 @@ export class RoomCreationComponent implements OnInit {
ngOnInit() {
}
resetEmptyInputs(): void {
this.emptyInputs = false;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment