Skip to content

Commit

Permalink
Fix booking edit cancel URL
Browse files Browse the repository at this point in the history
  • Loading branch information
craigrodway committed Dec 1, 2018
1 parent 9e13a8a commit 843c499
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion application/controllers/Bookings.php
Expand Up @@ -353,7 +353,7 @@ function edit($booking_id)
$booking = $this->bookings_model->Get($booking_id);

$query = $this->_get_query();
$uri = 'bookings/index?' . http_build_query($query);
$uri = 'bookings?' . http_build_query($query);

$can_edit = ( $this->userauth->CheckAuthLevel(ADMINISTRATOR) OR ($user_id == $booking->user_id));

Expand All @@ -364,6 +364,7 @@ function edit($booking_id)

$this->data['title'] = 'Edit booking';
$this->data['showtitle'] = $this->data['title'];
$this->data['cancel_uri'] = 'bookings?' . http_build_query($query);

// Lookups we need if an admin user
if ($this->userauth->CheckAuthLevel(ADMINISTRATOR)) {
Expand Down
2 changes: 1 addition & 1 deletion application/views/bookings/bookings_book.php
Expand Up @@ -191,7 +191,7 @@ function toggle_recurring(){
$save_label = empty($booking_id) ? 'Book' : 'Save';
$this->load->view('partials/submit', array(
'submit' => array($save_label, tab_index()),
'cancel' => array('Cancel', tab_index(), 'bookings?' . $query_string),
'cancel' => array('Cancel', tab_index(), $cancel_uri),
));

echo form_close();
Expand Down

0 comments on commit 843c499

Please sign in to comment.