Added bus reservation.
This commit is contained in:
parent
1210154612
commit
855ede9655
229
definitions/bus.json
Normal file
229
definitions/bus.json
Normal file
@ -0,0 +1,229 @@
|
||||
{
|
||||
"groups": {
|
||||
"0": "Ride Information",
|
||||
"4": "Ticket",
|
||||
"5": "Booking Information",
|
||||
"6": "Program Membership",
|
||||
"7": "Booking Agency",
|
||||
"8": "Hotlinks",
|
||||
"9": "Metadata"
|
||||
},
|
||||
"fields": {
|
||||
"bookingAgent_name": {
|
||||
"title": "Name",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"group": 7,
|
||||
"short": true
|
||||
},
|
||||
"bookingAgent_url": {
|
||||
"title": "URL",
|
||||
"type": "url",
|
||||
"required": false,
|
||||
"group": 7
|
||||
},
|
||||
"bookingTime": {
|
||||
"title": "Booking Date",
|
||||
"type": "datetime",
|
||||
"required": false,
|
||||
"group": 7
|
||||
},
|
||||
"cancelReservationUrl": {
|
||||
"title": "Cancel URL",
|
||||
"type": "url",
|
||||
"required": false,
|
||||
"group": 8
|
||||
},
|
||||
"checkinUrl": {
|
||||
"title": "Check in URL",
|
||||
"type": "url",
|
||||
"required": false,
|
||||
"group": 8
|
||||
},
|
||||
"confirmReservationUrl": {
|
||||
"title": "Confirm URL",
|
||||
"type": "url",
|
||||
"required": false,
|
||||
"group": 8
|
||||
},
|
||||
"modifiedTime": {
|
||||
"title": "Modified Time",
|
||||
"type": "datetime",
|
||||
"required": false,
|
||||
"group": 9
|
||||
},
|
||||
"modifyReservationUrl": {
|
||||
"title": "Confirm URL",
|
||||
"type": "url",
|
||||
"required": false,
|
||||
"group": 8
|
||||
},
|
||||
"programMembership_program": {
|
||||
"title": "Name of Program",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"group": 6,
|
||||
"short": true
|
||||
},
|
||||
"programMembership_memberNumber": {
|
||||
"title": "Member No.",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"group": 6,
|
||||
"short": true
|
||||
},
|
||||
"reservationFor_departureTime": {
|
||||
"title": "Departure Time",
|
||||
"type": "datetime",
|
||||
"required": true,
|
||||
"group": 0
|
||||
},
|
||||
"reservationFor_departureBusStation_name": {
|
||||
"title": "Departure Station Name",
|
||||
"type": "text",
|
||||
"required": true,
|
||||
"group": 0,
|
||||
"short": true
|
||||
},
|
||||
"reservationFor_arrivalTime": {
|
||||
"title": "Arrival Time",
|
||||
"type": "datetime",
|
||||
"required": true,
|
||||
"group": 0
|
||||
},
|
||||
"reservationFor_arrivalBusStation_name": {
|
||||
"title": "Arrival Station Name",
|
||||
"type": "text",
|
||||
"required": true,
|
||||
"group": 0,
|
||||
"short": true
|
||||
},
|
||||
"reservationFor_provider": {
|
||||
"title": "Bus Operator",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"group": 0,
|
||||
"short": true
|
||||
},
|
||||
"reservationFor_busName": {
|
||||
"title": "Bus name",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"group": 0,
|
||||
"short": true
|
||||
},
|
||||
"reservationFor_busNumber": {
|
||||
"title": "Bus number",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"group": 0,
|
||||
"short": true
|
||||
},
|
||||
"reservationNumber": {
|
||||
"title": "Reservation No.",
|
||||
"type": "text",
|
||||
"required": true,
|
||||
"group": 5,
|
||||
"short": true
|
||||
},
|
||||
"reservationStatus": {
|
||||
"title": "Status",
|
||||
"type": "status",
|
||||
"required": true,
|
||||
"group": 5,
|
||||
"short": true
|
||||
},
|
||||
"reservedTicket_additionalTicketText": {
|
||||
"title": "Additional information about ticket",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"group": 4
|
||||
},
|
||||
"reservedTicket_downloadUrl": {
|
||||
"title": "Ticket Download URL",
|
||||
"type": "url",
|
||||
"required": false,
|
||||
"group": 4
|
||||
},
|
||||
"reservedTicket_price": {
|
||||
"title": "Price",
|
||||
"type": "decimal",
|
||||
"required": false,
|
||||
"group": 5,
|
||||
"short": true
|
||||
},
|
||||
"reservedTicket_priceCurrency": {
|
||||
"title": "Currency",
|
||||
"type": "currency",
|
||||
"required": false,
|
||||
"group": 5,
|
||||
"short": true
|
||||
},
|
||||
"reservedTicket_printUrl": {
|
||||
"title": "Ticket Print URL",
|
||||
"type": "url",
|
||||
"required": false,
|
||||
"group": 4
|
||||
},
|
||||
"reservedTicket_ticketedSeat_seatingType": {
|
||||
"title": "Seat: Type/Class",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"group": 4,
|
||||
"short": true
|
||||
},
|
||||
"reservedTicket_ticketedSeat_seatRow": {
|
||||
"title": "Seat: Row",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"group": 4,
|
||||
"short": true
|
||||
},
|
||||
"reservedTicket_ticketedSeat_seatNumber": {
|
||||
"title": "Seat: Number",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"group": 4,
|
||||
"short": true
|
||||
},
|
||||
"reservedTicket_ticketNumber": {
|
||||
"title": "Ticket ID",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"group": 4
|
||||
},
|
||||
"reservedTicket_ticketToken": {
|
||||
"title": "Ticket Barcode",
|
||||
"type": "barcode",
|
||||
"required": false,
|
||||
"group": 4
|
||||
},
|
||||
"reservedTicket_underName_name": {
|
||||
"title": "Name on Ticket",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"group": 4,
|
||||
"default": "USER_NAME"
|
||||
},
|
||||
"underName_name": {
|
||||
"title": "Name on Reservation",
|
||||
"type": "text",
|
||||
"required": false,
|
||||
"group": 5,
|
||||
"default": "USER_NAME"
|
||||
},
|
||||
"underName_email": {
|
||||
"title": "Email address",
|
||||
"type": "email",
|
||||
"required": false,
|
||||
"group": 5,
|
||||
"default": "USER_EMAIL"
|
||||
},
|
||||
"url": {
|
||||
"title": "Booking URL",
|
||||
"type": "url",
|
||||
"required": false,
|
||||
"group": 8
|
||||
}
|
||||
}
|
||||
}
|
35
templates/bus_html.mustache
Normal file
35
templates/bus_html.mustache
Normal file
@ -0,0 +1,35 @@
|
||||
{{> html_head}}
|
||||
{{> mdl_head}}
|
||||
{{> mdl_content_head}}
|
||||
|
||||
<div class="frs-crumbs mdl-color-text--grey-500">
|
||||
<a href="./">Fake Reservation System</a> > Create Bus Reservation
|
||||
</div>
|
||||
|
||||
<h3><i class="material-icons">directions_bus</i> Bus Reservation</h3>
|
||||
|
||||
<form action="./send" method="post">
|
||||
<input type="hidden" name="form_type" value="{{action}}"/>
|
||||
|
||||
{{#form_data}}
|
||||
<h4>{{group_name}}</h4>
|
||||
|
||||
{{#fields}}
|
||||
{{>mdl_input}}
|
||||
{{/fields}}
|
||||
|
||||
{{/form_data}}
|
||||
|
||||
<p>
|
||||
<strong>The event will be sent to {{user.email}}.</strong>
|
||||
</p>
|
||||
|
||||
<button id="frs-button-send" type="submit" class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored">
|
||||
<i class="material-icons">send</i>
|
||||
</button>
|
||||
|
||||
</form>
|
||||
<script src="./js/frs.js" charset="utf-8"></script>
|
||||
{{> mdl_content_foot}}
|
||||
{{> mdl_foot}}
|
||||
{{> html_foot}}
|
@ -38,6 +38,15 @@
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
<li class="mdl-list__item mdl-list__item--three-line" onclick="location.href='./bus';">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-avatar">directions_bus</i>
|
||||
<span>Bus Reservation</span>
|
||||
<span class="mdl-list__item-text-body">
|
||||
Use this type to declare a reservation for bus travel.
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
<li class="mdl-list__item mdl-list__item--three-line" onclick="location.href='./hotel';">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-avatar">hotel</i>
|
||||
|
69
templates/mail_bus.mustache
Normal file
69
templates/mail_bus.mustache
Normal file
@ -0,0 +1,69 @@
|
||||
Return-Path: {{user.email}}
|
||||
From: Fake Reservation System <{{user.email}}>
|
||||
Subject: [FRS] {{form_type_uc}} Reservation
|
||||
Date: {{email_date}}
|
||||
X-Mailer: FRS/1.0
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/html; charset=utf-8
|
||||
|
||||
<html>
|
||||
<body>
|
||||
<p>
|
||||
<h1>YOUR RESERVATION DETAILS</h1>
|
||||
</p>
|
||||
<p>
|
||||
<div itemscope itemtype="http://schema.org/BusReservation">
|
||||
Reservation number: <span itemprop="reservationNumber">{{reservationNumber.value}}</span><br/>
|
||||
<link itemprop="reservationStatus" href="http://schema.org/Reservation{{reservationStatus.value}}"/>
|
||||
<link itemprop="url" href="{{url.value}}"/>
|
||||
<div itemprop="underName" itemscope itemtype="http://schema.org/Person">
|
||||
<meta itemprop="name" content="{{underName_name.value}}"/>
|
||||
<meta itemprop="email" content="{{underName_email.value}}"/>
|
||||
</div>
|
||||
<div itemprop="bookingAgent" itemscope itemtype="http://schema.org/Organization">
|
||||
<meta itemprop="name" content="{{bookingAgent_name.value}}"/>
|
||||
<link itemprop="url" href="{{bookingAgent_url.value}}"/>
|
||||
</div>
|
||||
<meta itemprop="bookingTime" content="{{bookingTime.value_iso8601}}"/>
|
||||
<link itemprop="cancelReservationUrl" href="{{cancelReservationUrl.value}}"/>
|
||||
<link itemprop="checkinUrl" href="{{checkinUrl.value}}"/>
|
||||
<link itemprop="confirmReservationUrl" href="{{confirmReservationUrl.value}}"/>
|
||||
<meta itemprop="modifiedTime" content="{{modifiedTime.value_iso8601}}"/>
|
||||
<link itemprop="modifyReservationUrl" href="{{modifyReservationUrl.value}}"/>
|
||||
<div itemprop="programMembership" itemscope itemtype="http://schema.org/ProgramMembership">
|
||||
<meta itemprop="memberNumber" content="{{programMembership_memberNumber.value}}"/>
|
||||
<meta itemprop="program" content="{{programMembership_program.value}}"/>
|
||||
</div>
|
||||
<div itemprop="reservationFor" itemscope itemtype="http://schema.org/BusTrip">
|
||||
<meta itemprop="provider" content="{{reservationFor_provider.value}}"/>
|
||||
<meta itemprop="busName" content="{{reservationFor_busName.value}}"/>
|
||||
<meta itemprop="busNumber" content="{{reservationFor_busNumber.value}}"/>
|
||||
<meta itemprop="departureTime" content="{{reservationFor_departureTime.value_iso8601}}"/>
|
||||
<div itemprop="departureBusStation" itemscope itemtype="http://schema.org/BusStation">
|
||||
<meta itemprop="name" content="{{reservationFor_departureBusStation_name.value}}"/>
|
||||
</div>
|
||||
<meta itemprop="arrivalTime" content="{{reservationFor_arrivalTime.value_iso8601}}"/>
|
||||
<div itemprop="arrivalBusStation" itemscope itemtype="http://schema.org/BusStation">
|
||||
<meta itemprop="name" content="{{reservationFor_arrivalBusStation_name.value}}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div itemprop="reservedTicket" itemscope itemtype="http://schema.org/Ticket">
|
||||
<meta itemprop="additionalTicketText" content="{{reservedTicket_additionalTicketText.value}}"/>
|
||||
<link itemprop="downloadUrl" href="{{reservedTicket_downloadUrl.value}}"/>
|
||||
Price: <span itemprop="price">{{reservedTicket_price.value}}</span> <span itemprop="priceCurrency">{{reservedTicket_priceCurrency.value}}</span>
|
||||
<link itemprop="printUrl" href="{{reservedTicket_printUrl.value}}"/>
|
||||
<div itemprop="ticketedSeat" itemscope itemtype="http://schema.org/Seat">
|
||||
<meta itemprop="seatingType" content="{{reservedTicket_ticketedSeat_seatingType.value}}"/>
|
||||
<meta itemprop="seatRow" content="{{reservedTicket_ticketedSeat_seatRow.value}}"/>
|
||||
<meta itemprop="seatNumber" content="{{reservedTicket_ticketedSeat_seatNumber.value}}"/>
|
||||
</div>
|
||||
<meta itemprop="ticketNumber" content="{{reservedTicket_ticketNumber.value}}"/>
|
||||
<meta itemprop="ticketToken" content="{{reservedTicket_ticketToken.value}}"/>
|
||||
<div itemprop="underName" itemscope itemtype="http://schema.org/Person">
|
||||
<meta itemprop="name" content="{{reservedTicket_underName_name.value}}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user