You are here

function bat_type_form in Booking and Availability Management Tools for Drupal 7

Form callback: edit a type.

File

modules/bat_unit/bat_type.admin.inc, line 332
BatType editing UI.

Code

function bat_type_form($form, &$form_state, $type, $op = 'edit') {

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