Prepare input handling.

This commit is contained in:
Markus Birth 2016-05-25 16:58:13 +02:00
parent 83e3425690
commit d2d66382e2
2 changed files with 9 additions and 2 deletions

View File

@ -48,6 +48,10 @@ if (isset($_GET['action'])) {
$tpl = $m->loadTemplate('faq_html');
$tpl_done = true;
break;
case 'send':
$form_type = $_POST['form_type'];
// TODO: Store form data in session
break;
}
}
@ -90,6 +94,9 @@ if (!$tpl_done && isset($_SESSION['access_token']) && $_SESSION['access_token'])
$tpl_done = true;
} else {
switch ($_GET['action']) {
case 'send':
echo "This would send the mail...";
break;
case 'event':
$tpl = $m->loadTemplate('event_html');
$tpl_done = true;

View File

@ -8,7 +8,8 @@
<h3><i class="material-icons">hotel</i> Hotel Reservation</h3>
<form action="./" method="post">
<form action="./send" method="post">
<input type="hidden" name="form_type" value="{{action}}"/>
{{#form_data}}
<h4>{{group_name}}</h4>
@ -17,7 +18,6 @@
{{>mdl_input}}
{{/fields}}
{{/form_data}}
<p>