function bat_unit_form in Booking and Availability Management Tools for Drupal 7
Form callback: edit a Unit.
File
- modules/
bat_unit/ bat_unit.admin.inc, line 138 - BatUnit editing UI.
Code
function bat_unit_form($form, &$form_state, $unit, $op = 'edit') {
// Add the breadcrumb for the form's location.
bat_unit_set_breadcrumb();
drupal_set_title(t('Edit !unit_name', array(
'!unit_name' => $unit->name,
)));
$unit->date = format_date($unit->created, 'custom', 'Y-m-d H:i:s O');
$account = user_load($unit->uid);
$unit->author_name = isset($account->name) ? $account->name : '';
return bat_unit_edit_form($form, $form_state, $unit);
}