diff --git a/booking.events.inc b/booking.events.inc index 6a5afa6..5efe5e7 100644 --- a/booking.events.inc +++ b/booking.events.inc @@ -15,8 +15,8 @@ function booking_event_admin() $header = array ( 'booking_eventid' => t('Event ID'), - 'booking_eventname' => t('Event Name'), - 'booking_event_active' => t('Event currently active'), + 'booking_eventname' => t('Event Name'), + 'booking_event_active' => t('Event currently active'), 'booking_event_start' => t('Event Start Date'), 'booking_event_end' => t('Event End Date'), 'booking_register_open' => t('Registrations open'), @@ -32,8 +32,8 @@ function booking_event_admin() $options[$data->eid] = array ( 'booking_eventid' => $data->eid, - 'booking_eventname' => $data->booking_eventname, - 'booking_event_active' => $data->booking_event_active == 1 ? 'Yes' : 'No', + 'booking_eventname' => $data->booking_eventname, + 'booking_event_active' => $data->booking_event_active == 1 ? 'Yes' : 'No', 'booking_event_start' => date("Y-m-d H:i", $data->booking_event_start), 'booking_event_end' => date("Y-m-d H:i", $data->booking_event_end), 'booking_register_open' => date("Y-m-d H:i", $data->booking_register_open), diff --git a/booking.prices.inc b/booking.prices.inc index f4f7ffd..704fc58 100644 --- a/booking.prices.inc +++ b/booking.prices.inc @@ -25,8 +25,10 @@ function booking_price_admin() 'booking_edit' => t('Edit Price'), ); - $result = db_query("SELECT pid, booking_eventid, booking_price, booking_late_price, booking_late_buttonid, booking_price_descrip, booking_buttonid, booking_price_active, " . - "booking_depositonly from {booking_price}"); + $result = db_query("SELECT pid, p.booking_eventid, booking_price, booking_late_price, booking_late_buttonid, booking_price_descrip, " . + "booking_buttonid, booking_price_active, booking_depositonly, e.booking_eventname" . + "from {booking_price} p " . + "inner join {booking_event} e on e.booking_eventid = p.booking_eventid"); foreach($result as $data) { @@ -61,7 +63,13 @@ function booking_price_admin() ( '#type' => 'submit', '#value' => t('Set Inactive'), - ); + ); + + $form['submit_current'] = array + ( + '#type' => 'submit', + '#value' => t('Change to current event'), + ); //watchdog('booking', 'Setting button form: @info', array ('@info' => var_export($form, TRUE)));