You are here

function bat_booking_form in Booking and Availability Management Tools for Drupal 7

File

modules/bat_booking/bat_booking.admin.inc, line 171
BatBooking editing UI.

Code

function bat_booking_form($form, &$form_state, $booking, $op = 'edit') {
  global $user;

  // Add the breadcrumb for the form's location.
  bat_booking_set_breadcrumb();
  drupal_set_title(t('Edit !booking_label', array(
    '!booking_label' => $booking->label,
  )));
  $booking->date = format_date($booking->created, 'custom', 'Y-m-d H:i:s O');
  $account = user_load($booking->uid);
  $booking->author_name = isset($account->name) ? $account->name : '';
  return bat_booking_edit_form($form, $form_state, $booking);
}