Add restaurant support. (Input only for now.)
This commit is contained in:
parent
c9843e9a50
commit
cd8ab8155e
182
definitions/restaurant.json
Normal file
182
definitions/restaurant.json
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
{
|
||||||
|
"groups": {
|
||||||
|
"0": "Restaurant Information",
|
||||||
|
"1": "Date",
|
||||||
|
"2": "Booking Details",
|
||||||
|
"3": "Program Membership",
|
||||||
|
"4": "Booking Agency",
|
||||||
|
"5": "Hotlinks",
|
||||||
|
"6": "Metadata"
|
||||||
|
},
|
||||||
|
"fields": {
|
||||||
|
"bookingAgent_name": {
|
||||||
|
"title": "Name",
|
||||||
|
"type": "text",
|
||||||
|
"required": false,
|
||||||
|
"group": 4,
|
||||||
|
"short": true
|
||||||
|
},
|
||||||
|
"bookingAgent_url": {
|
||||||
|
"title": "URL",
|
||||||
|
"type": "url",
|
||||||
|
"required": false,
|
||||||
|
"group": 4
|
||||||
|
},
|
||||||
|
"bookingTime": {
|
||||||
|
"title": "Booking Date",
|
||||||
|
"type": "datetime",
|
||||||
|
"required": false,
|
||||||
|
"group": 4
|
||||||
|
},
|
||||||
|
"cancelReservationUrl": {
|
||||||
|
"title": "Cancel URL",
|
||||||
|
"type": "url",
|
||||||
|
"required": false,
|
||||||
|
"group": 5
|
||||||
|
},
|
||||||
|
"confirmReservationUrl": {
|
||||||
|
"title": "Confirm URL",
|
||||||
|
"type": "url",
|
||||||
|
"required": false,
|
||||||
|
"group": 5
|
||||||
|
},
|
||||||
|
"modifiedTime": {
|
||||||
|
"title": "Modified Time",
|
||||||
|
"type": "datetime",
|
||||||
|
"required": false,
|
||||||
|
"group": 6
|
||||||
|
},
|
||||||
|
"modifyReservationUrl": {
|
||||||
|
"title": "Modify URL",
|
||||||
|
"type": "url",
|
||||||
|
"required": false,
|
||||||
|
"group": 5
|
||||||
|
},
|
||||||
|
"partySize": {
|
||||||
|
"title": "Number of people",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"group": 2
|
||||||
|
},
|
||||||
|
"programMembership_program": {
|
||||||
|
"title": "Name of Program",
|
||||||
|
"type": "text",
|
||||||
|
"required": false,
|
||||||
|
"group": 3,
|
||||||
|
"short": true
|
||||||
|
},
|
||||||
|
"programMembership_memberNumber": {
|
||||||
|
"title": "Member No.",
|
||||||
|
"type": "text",
|
||||||
|
"required": false,
|
||||||
|
"group": 3,
|
||||||
|
"short": true
|
||||||
|
},
|
||||||
|
"reservationFor_name": {
|
||||||
|
"title": "Restaurant Name",
|
||||||
|
"type": "text",
|
||||||
|
"required": true,
|
||||||
|
"group": 0
|
||||||
|
},
|
||||||
|
"reservationFor_address_streetAddress": {
|
||||||
|
"title": "Street",
|
||||||
|
"type": "text",
|
||||||
|
"required": true,
|
||||||
|
"group": 0
|
||||||
|
},
|
||||||
|
"reservationFor_address_postalCode": {
|
||||||
|
"title": "Zip Code",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"group": 0,
|
||||||
|
"short": true
|
||||||
|
},
|
||||||
|
"reservationFor_address_addressLocality": {
|
||||||
|
"title": "City",
|
||||||
|
"type": "text",
|
||||||
|
"required": true,
|
||||||
|
"group": 0
|
||||||
|
},
|
||||||
|
"reservationFor_address_addressRegion": {
|
||||||
|
"title": "Region",
|
||||||
|
"type": "text",
|
||||||
|
"required": true,
|
||||||
|
"group": 0,
|
||||||
|
"short": true
|
||||||
|
},
|
||||||
|
"reservationFor_address_addressCountry": {
|
||||||
|
"title": "Country",
|
||||||
|
"type": "country",
|
||||||
|
"required": true,
|
||||||
|
"group": 0
|
||||||
|
},
|
||||||
|
"reservationFor_telephone": {
|
||||||
|
"title": "Telephone",
|
||||||
|
"type": "tel",
|
||||||
|
"required": true,
|
||||||
|
"group": 0,
|
||||||
|
"short": true
|
||||||
|
},
|
||||||
|
"reservationFor_url": {
|
||||||
|
"title": "Website URL",
|
||||||
|
"type": "url",
|
||||||
|
"required": false,
|
||||||
|
"group": 0
|
||||||
|
},
|
||||||
|
"reservationFor_image": {
|
||||||
|
"title": "Restaurant Image URL",
|
||||||
|
"type": "url",
|
||||||
|
"required": false,
|
||||||
|
"group": 0
|
||||||
|
},
|
||||||
|
"reservationNumber": {
|
||||||
|
"title": "Reservation #",
|
||||||
|
"type": "text",
|
||||||
|
"required": true,
|
||||||
|
"group": 2,
|
||||||
|
"short": true
|
||||||
|
},
|
||||||
|
"price": {
|
||||||
|
"title": "Price",
|
||||||
|
"type": "decimal",
|
||||||
|
"required": false,
|
||||||
|
"group": 2,
|
||||||
|
"short": true
|
||||||
|
},
|
||||||
|
"priceCurrency": {
|
||||||
|
"title": "Currency",
|
||||||
|
"type": "currency",
|
||||||
|
"required": false,
|
||||||
|
"group": 2,
|
||||||
|
"short": true
|
||||||
|
},
|
||||||
|
"reservationStatus": {
|
||||||
|
"title": "Status",
|
||||||
|
"type": "status",
|
||||||
|
"required": true,
|
||||||
|
"group": 2,
|
||||||
|
"short": true
|
||||||
|
},
|
||||||
|
"underName_name": {
|
||||||
|
"title": "Name on Reservation",
|
||||||
|
"type": "text",
|
||||||
|
"required": true,
|
||||||
|
"group": 2,
|
||||||
|
"default": "USER_NAME"
|
||||||
|
},
|
||||||
|
"underName_email": {
|
||||||
|
"title": "Email address",
|
||||||
|
"type": "email",
|
||||||
|
"required": false,
|
||||||
|
"group": 2,
|
||||||
|
"default": "USER_EMAIL"
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"title": "Booking URL",
|
||||||
|
"type": "url",
|
||||||
|
"required": false,
|
||||||
|
"group": 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -137,7 +137,13 @@ if (!$tpl_done && isset($_SESSION['access_token']) && $_SESSION['access_token'])
|
|||||||
$action = 'hotel';
|
$action = 'hotel';
|
||||||
require 'prep_form.php';
|
require 'prep_form.php';
|
||||||
break;
|
break;
|
||||||
default:
|
case 'restaurant':
|
||||||
|
$tpl = $m->loadTemplate('restaurant_html');
|
||||||
|
$tpl_done = true;
|
||||||
|
$action = 'restaurant';
|
||||||
|
require 'prep_form.php';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
if (!$tpl_done) {
|
if (!$tpl_done) {
|
||||||
$tpl = $m->loadTemplate('loggedin_html');
|
$tpl = $m->loadTemplate('loggedin_html');
|
||||||
$tpl_done = true;
|
$tpl_done = true;
|
||||||
|
35
templates/restaurant_html.mustache
Normal file
35
templates/restaurant_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 Restaurant Reservation
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3><i class="material-icons">restaurant</i> Restaurant 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}}
|
Reference in New Issue
Block a user