mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-22 16:02:54 +03:00
parent
6eb710801b
commit
daa4d28a6e
2 changed files with 128 additions and 118 deletions
|
@ -114,6 +114,7 @@ class Appointments extends CI_Controller {
|
|||
// sync is enabled then add the appointment to the provider's account.
|
||||
|
||||
try {
|
||||
$view = array();
|
||||
$post_data = json_decode($_POST['post_data'], true);
|
||||
$appointment = $post_data['appointment'];
|
||||
$customer = $post_data['customer'];
|
||||
|
@ -213,6 +214,11 @@ class Appointments extends CI_Controller {
|
|||
} catch(Exception $exc) {
|
||||
$view['exceptions'][] = $exc;
|
||||
}
|
||||
|
||||
// Save any exceptions to the session and redirect to another page so that the user
|
||||
// will not add a new appointment on page reload.
|
||||
$this->load->helper('url');
|
||||
$view['exceptions'] = (!empty($view['exceptions'])) ? $view['exceptions'] : array();
|
||||
$this->session->set_flashdata('book_exceptions', $view['exceptions']);
|
||||
redirect('appointments/book_success/'.$appointment['id']);
|
||||
}
|
||||
|
|
|
@ -42,10 +42,14 @@
|
|||
</div>
|
||||
<div class="col-xs-12 col-sm-10">
|
||||
<?php
|
||||
echo '<h3>' . $this->lang->line('appointment_registered') . '</h3>';
|
||||
echo '<p>' . $this->lang->line('appointment_details_was_sent_to_you') . '</p>';
|
||||
echo '<a href="'.$this->config->item('base_url').'" class="btn btn-primary btn-large">
|
||||
<span class="glyphicon glyphicon-calendar"></span>'.$this->lang->line('go_to_booking_page').'</a>';
|
||||
echo '
|
||||
<h3>' . $this->lang->line('appointment_registered') . '</h3>
|
||||
<p>' . $this->lang->line('appointment_details_was_sent_to_you') . '</p>
|
||||
<a href="'.$this->config->item('base_url').'" class="btn btn-success btn-large">
|
||||
<span class="glyphicon glyphicon-calendar"></span>' .
|
||||
$this->lang->line('go_to_booking_page') . '
|
||||
</a>
|
||||
';
|
||||
|
||||
if ($this->config->item('ea_google_sync_feature')) {
|
||||
echo '
|
||||
|
|
Loading…
Reference in a new issue