Skip to content
Snippets Groups Projects
Commit 1edc317d authored by Erik Moravec's avatar Erik Moravec
Browse files

feat: UI and buttons finetune

parent 3533776d
No related branches found
No related tags found
No related merge requests found
<div class="container">
<div class="container m-0">
<div [hidden]="submitted">
<h1>New Game Form</h1>
<form #gameForm="ngForm" (ngSubmit)="onSubmit()">
<h1 class="fw-bold ms-2 mt-2 fs-2">New Game Form</h1>
<form #gameForm="ngForm" (ngSubmit)="onSubmit()" class="ms-3">
<div class="form-group">
<label for="gameDateTime">Game Date</label>
<input #gameDateTime="ngModel" [(ngModel)]="model.gameDateTime" class="form-control"
......@@ -40,31 +40,8 @@
</div>
</div>
<button [disabled]="!gameForm.form.valid" class="btn btn-success" type="submit">Submit</button>
<button (click)="resetForm(); gameForm.reset()" class="btn btn-default" type="button">Reset Form</button>
<button [disabled]="!gameForm.form.valid" class="btn mt-2 btn-success" type="submit">Create</button>
<button (click)="resetForm(); gameForm.reset()" class="btn mt-2 ms-2 btn-danger" type="button">Reset</button>
</form>
</div>
<div [hidden]="!submitted">
<h2>You submitted the following:</h2>
<div class="row">
<div class="col-xs-3">Game Date</div>
<div *ngIf="model.homeTeam" class="col-xs-9">{{ model.gameDateTime }}</div>
</div>
<div class="row">
<div class="col-xs-3">Home Team</div>
<div *ngIf="model.homeTeam" class="col-xs-9">{{ model.homeTeam.name }}</div>
<div *ngIf="!model.homeTeam" class="col-xs-9">{{ model.homeTeam }}</div>
</div>
<div class="row">
<div class="col-xs-3">Away Team</div>
<div *ngIf="model.awayTeam" class="col-xs-9">{{model.awayTeam.name}}</div>
<div *ngIf="!model.awayTeam" class="col-xs-9">Empty {{ model.awayTeam }}</div>
</div>
<br>
<div [hidden]="confirmed">
<button (click)="confirmSubmission()" class="btn btn-primary">Confirm</button>
<button (click)="submitted=false" class="btn btn-primary">Edit</button>
</div>
</div>
</div>
......@@ -27,6 +27,7 @@ export class CreateTeamFormComponent implements OnInit {
onSubmit(): void {
this.submitted = true;
this.confirmSubmission();
}
resetForm(): void {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment