-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
644cf7f
commit a6c7923
Showing
5 changed files
with
127 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,34 @@ | ||
<div class="bg-info p-2 text-center"> | ||
<h3>SPORTS STORE Authentication</h3> | ||
</div> | ||
<div class="bg-danger mt-2 p-2 text-center text-white" *ngIf="errorMessage != null"> | ||
{{ errorMessage }} | ||
</div> | ||
<div class="p-2"> | ||
<form novalidate #form="ngForm" (ngSubmit)="authenticate(form)"> | ||
<div class="form-group"> | ||
<label>Name</label> | ||
<input class="form-control" name="username" [(ngModel)]="username" required /> | ||
<div class="container-fluid"> | ||
<nav class="navbar fixed-top bg-light" style="background-color: #6768AA !important;"> | ||
<div class="container-fluid"> | ||
<a class="navbar-brand text-white" routerLink="/store">Sports Store</a> | ||
</div> | ||
<div class="form-group"> | ||
<label>Password</label> | ||
<input class="form-control" type="password" name="password" [(ngModel)]="password" required /> | ||
</div> | ||
<div class="text-center"> | ||
<button class="btn btn-secondary m-1" routerLink="/">Go back></button> | ||
<button class="btn btn-primary m-1" type="submit">Log in</button> | ||
</nav> | ||
</div> | ||
|
||
<div class="container-fluid" style="padding-top: 60px;"> | ||
<div class="row"> | ||
<div class="col-4"></div> | ||
<div class="col-4"> | ||
<div class="bg-danger mt-2 p-2 text-center text-white" *ngIf="errorMessage != null"> | ||
{{ errorMessage }} | ||
</div> | ||
<div class="p-2"> | ||
<form novalidate #form="ngForm" (ngSubmit)="authenticate(form)"> | ||
<div class="form-group"> | ||
<label>Name</label> | ||
<input class="form-control" name="username" [(ngModel)]="username" required /> | ||
</div> | ||
<div class="form-group"> | ||
<label>Password</label> | ||
<input class="form-control" type="password" name="password" [(ngModel)]="password" required /> | ||
</div> | ||
<div class="text-center" style="margin-top: 20px;"> | ||
<button class="btn btn-secondary m-1" routerLink="/">Go back</button> | ||
<button class="btn btn-primary m-1" style="background-color: #5B588C;" type="submit">Log in</button> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<div class="float-end"> | ||
<a routerLink="/cart" style="color: white;padding-right: 10px;"> | ||
<a routerLink="/cart" style="color: white;padding-right: 15px;"> | ||
<i class="fa fa-shopping-cart"></i> | ||
</a> | ||
<a routerLink="/admin" style="color: white;padding-right: 10px;"> | ||
<a routerLink="/admin" style="color: white;padding-right: 15px;"> | ||
<i class="fa fa-user"></i> | ||
</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,70 @@ | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
<div class="col bg-dark text-white"> | ||
<a class="navbar-brand">SPORTS STORE</a> | ||
<nav class="navbar fixed-top bg-light" style="background-color: #6768AA !important;"> | ||
<div class="container-fluid"> | ||
<a class="navbar-brand text-white" routerLink="/store">Sports Store</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div *ngIf="orderSent" class="m-2 text-center"> | ||
<h2>Thanks!</h2> | ||
<p>Thanks for placing your order.</p> | ||
<p>We'll ship your goods as soon as possible.</p> | ||
<button class="btn btn-primary" routerLink="/store">Return to Store</button> | ||
</nav> | ||
</div> | ||
|
||
<form *ngIf="!orderSent" #form="ngForm" novalidate (ngSubmit)="submitOrder(form)" class="m-2"> | ||
<div class="form-group"> | ||
<label>Name</label> | ||
<input class="form-control" #name="ngModel" name="name" [(ngModel)]="order.name" required/> | ||
<span *ngIf="submitted && name.invalid" class="text-danger"> | ||
Please enter your name | ||
</span> | ||
</div> | ||
<div class="form-group"> | ||
<label>Address</label> | ||
<input class="form-control" #address="ngModel" name="address" [(ngModel)]="order.address" required/> | ||
<span *ngIf="submitted && address.invalid" class="text-danger"> | ||
Please enter your address | ||
</span> | ||
</div> | ||
<div class="form-group"> | ||
<label>City</label> | ||
<input class="form-control" #city="ngModel" name="city" [(ngModel)]="order.city" required/> | ||
<span *ngIf="submitted && city.invalid" class="text-danger"> | ||
Please enter your city | ||
</span> | ||
</div> | ||
<div class="form-group"> | ||
<label>State</label> | ||
<input class="form-control" #state="ngModel" name="state" [(ngModel)]="order.state" required/> | ||
<span *ngIf="submitted && state.invalid" class="text-danger"> | ||
Please enter your state | ||
</span> | ||
</div> | ||
<div class="form-group"> | ||
<label>Zip/Postal</label> | ||
<input class="form-control" #zip="ngModel" name="zip" [(ngModel)]="order.zip" required/> | ||
<span *ngIf="submitted && zip.invalid" class="text-danger"> | ||
Please enter your zip/postal code | ||
</span> | ||
</div> | ||
<div class="form-group"> | ||
<label>Country</label> | ||
<input class="form-control" #country="ngModel" name="country" [(ngModel)]="order.country" required/> | ||
<span *ngIf="submitted && country.invalid" class="text-danger"> | ||
Please enter your country | ||
</span> | ||
</div> | ||
<div class="text-center"> | ||
<button class="btn btn-secondary m-1" routerLink="/cart">Back</button> | ||
<button class="btn btn-primary m-1" type="submit">Complete Order</button> | ||
<div class="container-fluid" style="padding-top: 60px;"> | ||
<div class="row"> | ||
<div class="col-2"></div> | ||
<div class="col-8"> | ||
<div *ngIf="orderSent" class="m-2 text-center"> | ||
<h2>Thanks!</h2> | ||
<p>Thanks for placing your order.</p> | ||
<p>We'll ship your goods as soon as possible.</p> | ||
<button class="btn btn-primary" style="background-color: #6768AA;" routerLink="/store">Return to Store</button> | ||
</div> | ||
|
||
<form *ngIf="!orderSent" #form="ngForm" novalidate (ngSubmit)="submitOrder(form)" class="m-2"> | ||
<div class="form-group"> | ||
<label>Name</label> | ||
<input class="form-control" #name="ngModel" name="name" [(ngModel)]="order.name" required/> | ||
<span *ngIf="submitted && name.invalid" class="text-danger"> | ||
Please enter your name | ||
</span> | ||
</div> | ||
<div class="form-group"> | ||
<label>Address</label> | ||
<input class="form-control" #address="ngModel" name="address" [(ngModel)]="order.address" required/> | ||
<span *ngIf="submitted && address.invalid" class="text-danger"> | ||
Please enter your address | ||
</span> | ||
</div> | ||
<div class="form-group"> | ||
<label>City</label> | ||
<input class="form-control" #city="ngModel" name="city" [(ngModel)]="order.city" required/> | ||
<span *ngIf="submitted && city.invalid" class="text-danger"> | ||
Please enter your city | ||
</span> | ||
</div> | ||
<div class="form-group"> | ||
<label>State</label> | ||
<input class="form-control" #state="ngModel" name="state" [(ngModel)]="order.state" required/> | ||
<span *ngIf="submitted && state.invalid" class="text-danger"> | ||
Please enter your state | ||
</span> | ||
</div> | ||
<div class="form-group"> | ||
<label>Zip/Postal</label> | ||
<input class="form-control" #zip="ngModel" name="zip" [(ngModel)]="order.zip" required/> | ||
<span *ngIf="submitted && zip.invalid" class="text-danger"> | ||
Please enter your zip/postal code | ||
</span> | ||
</div> | ||
<div class="form-group"> | ||
<label>Country</label> | ||
<input class="form-control" #country="ngModel" name="country" [(ngModel)]="order.country" required/> | ||
<span *ngIf="submitted && country.invalid" class="text-danger"> | ||
Please enter your country | ||
</span> | ||
</div> | ||
<div class="float-end mt-2"> | ||
<button class="btn btn-secondary m-1" routerLink="/cart">Back</button> | ||
<button class="btn btn-primary m-1" style="background-color: #6768AA;" type="submit">Complete Order</button> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</form> | ||
</div> |