|
1 | 1 | <h1>Create a new event</h1>
|
2 | 2 | <div class="container " ng-controller="ponctualEventCreationPageController">
|
3 | 3 |
|
| 4 | + <br /> |
4 | 5 | <div class="row">
|
5 | 6 |
|
6 | 7 | <div name="formPonctualEvent" class="col-md-3 col-lg-offset-4">
|
7 | 8 |
|
8 |
| - <form ng-submit="createEvent()"> |
| 9 | + <form id="createEventForm" ng-submit="createEvent()"> |
9 | 10 |
|
10 | 11 | <div class="form-group">
|
| 12 | + <label>Your event name</label> |
11 | 13 | <input class="form-control" ng-model="ponctualEvent.event.eventName" placeholder="Event name" required>
|
12 | 14 | </div>
|
13 | 15 |
|
14 | 16 | <div class="form-group">
|
15 |
| - <div class="input-group"> |
16 |
| - <div class="input-group-btn"> |
17 |
| - <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Select an activity <span class="caret"></span></button> |
18 |
| - <ul class="dropdown-menu" ng-repeat="activity in filtered = (activities | filter: query)"> |
19 |
| - <li><a ng-click="activitySelected(activity)">{{activity.activityName}}</a></li> |
20 |
| - </ul> |
21 |
| - </div> |
22 |
| - <input type="text" class="form-control" id="selectedActivity" disabled> |
23 |
| - </div> |
| 17 | + <label for="actSelect">Select an activity</label> |
| 18 | + <select class="form-control" id="actSelect"> |
| 19 | + <option ng-repeat="activity in filtered = (activities | filter: query)" value="{{activity.activityId}}">{{activity.activityName}}</option> |
| 20 | + </select> |
24 | 21 | </div>
|
25 | 22 |
|
26 | 23 | <div class="form-group">
|
27 |
| - <div class="input-group"> |
28 |
| - <div class="input-group-btn"> |
29 |
| - <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Select a room <span class="caret"></span></button> |
30 |
| - <ul class="dropdown-menu" ng-repeat="room in filtered = (rooms | filter: query)"> |
31 |
| - <li><a ng-click="roomSelected(room)">{{room.roomName}}</a></li> |
32 |
| - </ul> |
33 |
| - </div> |
34 |
| - <input type="text" class="form-control" id="selectedRoom" disabled> |
35 |
| - </div> |
| 24 | + <label for="roomSelect">Select a room</label> |
| 25 | + <select class="form-control" id="roomSelect"> |
| 26 | + <option ng-repeat="room in filtered = (rooms | filter: query)" value="{{room.roomId}}">{{room.roomName}}</option> |
| 27 | + </select> |
36 | 28 | </div>
|
37 | 29 |
|
38 | 30 | <div class="form-group">
|
| 31 | + <label>Date</label> |
39 | 32 | <input type="date" format="yyyy-MM-dd" name="ponctualEvent.eventDate" class="form-control" ng-model="ponctualEvent.eventDate" placeholder="Date" required>
|
40 | 33 | <p class="text-danger" ng-if="dateError">You can't create an event in the past. Unless you are a wizard. Which I doubt.</p>
|
41 | 34 | </div>
|
42 | 35 |
|
43 | 36 | <div class="form-group">
|
| 37 | + <label>Beginning time</label> |
44 | 38 | <input type="time" format="HH:mm" min="08:00" max="22:00" name="ponctualEvent.event.timeBegin" class="form-control" ng-model="ponctualEvent.event.timeBegin" placeholder="Time of the event beginning" required>
|
45 | 39 | </div>
|
46 | 40 |
|
47 | 41 | <div class="form-group">
|
| 42 | + <label>Duration</label> |
48 | 43 | <input type="number" min="0.5" step="0.5" name="ponctualEvent.event.eventDurationHours" class="form-control" ng-model="ponctualEvent.event.eventDurationHours" placeholder="Duration in hours (can be 1.5)" required>
|
49 | 44 | </div>
|
50 | 45 |
|
51 | 46 | <div class="form-group">
|
| 47 | + <label>Description</label> |
52 | 48 | <input name="ponctualEvent.event.eventDescription" class="form-control" ng-model="ponctualEvent.event.eventDescription" placeholder="Description" required>
|
53 | 49 | </div>
|
54 | 50 |
|
55 | 51 | <div class="form-group">
|
| 52 | + <label>Price</label> |
56 | 53 | <input type="number" min="0" step="0.01" name="ponctualEvent.event.eventPrice" class="form-control" ng-model="ponctualEvent.event.eventPrice" placeholder="Price (€)" required>
|
57 | 54 | </div>
|
58 | 55 |
|
59 | 56 | <div class="form-group">
|
| 57 | + <label>Maximum participants allowed</label> |
60 | 58 | <input type="number" min="0" name="ponctualEvent.event.eventMaxPeople" class="form-control" ng-model="ponctualEvent.event.eventMaxPeople" placeholder="Maximum number of participants" required>
|
61 | 59 | </div>
|
62 | 60 |
|
63 | 61 | <input type="submit" id="submit" value="Validate" class="btn btn-primary" />
|
64 |
| -</form> |
| 62 | + </form> |
65 | 63 | </div>
|
66 | 64 | </div>
|
67 | 65 | </div>
|
|
0 commit comments