source: trip-planner-front/src/app/locations-form/locations-form.component.html@ 6c1585f

Last change on this file since 6c1585f was 6c1585f, checked in by Ema <ema_spirova@…>, 3 years ago

edit planner form with angular

  • Property mode set to 100644
File size: 2.4 KB
Line 
1<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
2
3<div class="example-form">
4
5 <div class="form-group">
6 <button class="btn" (click)="chooseCityOption()" >
7 City
8 </button>
9 <button class="btn" (click)="chooseRegionOption()">
10 Region
11 </button>
12 </div>
13 <br>
14 <br>
15
16 <div *ngIf="cityOption">
17 <label><h5>Please select a city</h5></label>
18 <mat-form-field appearance="fill" class="example-full-width">
19 <mat-label>Please select a city</mat-label>
20 <mat-select [(ngModel)]="cityId" placeholder="Select city">
21 <mat-option [value]="city.id" *ngFor="let city of cities" [value]="city.id"> {{city.name}}</mat-option>
22 </mat-select>
23 </mat-form-field>
24 </div>
25
26 <div *ngIf="regionOption">
27 <label><h5>Please select a region</h5></label>
28 <mat-form-field appearance="fill" class="example-full-width">
29 <mat-label>Please select a region</mat-label>
30 <mat-select [(ngModel)]="regionId" placeholder="Select region">
31 <mat-option [value]="region.id" *ngFor="let region of regions" [value]="region.id"> {{region.name}}</mat-option>
32 </mat-select>
33 </mat-form-field>
34 </div>
35
36 <h5>Who are you travelling with? </h5>
37 <mat-form-field appearance="fill" class="example-full-width">
38 <mat-label>Please select a companion</mat-label>
39 <mat-select [(ngModel)]="companionId" placeholder="Please select a companion">
40 <mat-option [value]="companion.id" *ngFor="let companion of companions">{{companion.type}}</mat-option>
41 </mat-select>
42 </mat-form-field>
43
44 <h5>How many days are you willing to stay ?</h5>
45 <mat-form-field class="example-full-width" appearance="fill">
46 <mat-label>Please select a number of days</mat-label>
47 <input matInput placeholder="No. Days" type="number" min="1" value="0" max="30" [constraintMaxNumberDays()] [(ngModel)]="lengthOfStay">
48 </mat-form-field>
49
50 <h5>What are your priorities to visit?</h5>
51 <mat-chip-list selectable multiple >
52 <mat-chip #c="matChip" selected *ngFor="let category of categories"
53 (click)="toggleSelection(c, category)" [ngClass]="{'yellow' : toggle}">
54 <mat-icon *ngIf="!c.selected" >check</mat-icon>
55 {{category.name}}
56 </mat-chip>
57 </mat-chip-list>
58 <br>
59 <button mat-raised-button color="primary" (click)="createMyPlanner()">Create my planner</button>
60
61</div>
62
Note: See TracBrowser for help on using the repository browser.