From 843c499e9c9f622d65392c8cbd02ac9e3872a52f Mon Sep 17 00:00:00 2001 From: Craig A Rodway Date: Sat, 1 Dec 2018 14:45:19 +0000 Subject: [PATCH] Fix booking edit cancel URL --- application/controllers/Bookings.php | 3 ++- application/views/bookings/bookings_book.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/application/controllers/Bookings.php b/application/controllers/Bookings.php index 36d26cd9..ebeeaf78 100644 --- a/application/controllers/Bookings.php +++ b/application/controllers/Bookings.php @@ -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)); @@ -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)) { diff --git a/application/views/bookings/bookings_book.php b/application/views/bookings/bookings_book.php index 6719490a..846ff012 100644 --- a/application/views/bookings/bookings_book.php +++ b/application/views/bookings/bookings_book.php @@ -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();