function biblio_admin_author_types_form in Bibliography Module 6
Same name and namespace in other branches
- 6.2 includes/biblio.admin.inc \biblio_admin_author_types_form()
- 7 includes/biblio.admin.inc \biblio_admin_author_types_form()
- 7.2 includes/biblio.admin.inc \biblio_admin_author_types_form()
2 string references to 'biblio_admin_author_types_form'
- biblio_forms in ./
biblio.module - biblio_menu in ./
biblio.module - Implementation of hook_menu().
File
- ./
biblio.admin.inc, line 1537
Code
function biblio_admin_author_types_form($form_state, $op = NULL, $id = NULL) {
switch ($op) {
case 'edit':
$type = db_fetch_object(db_query("SELECT * FROM {biblio_contributor_type_data} WHERE auth_type=%d", $id));
$form['auth_type'] = array(
'#type' => 'hidden',
'#value' => $type->auth_type,
);
//fall through and use the same form used for a new entry
case 'new':
$form['title'] = array(
'#type' => 'textfield',
'#title' => t('Type Name'),
'#size' => 20,
'#weight' => 1,
'#default_value' => $op == 'new' ? '' : $type->title,
'#required' => TRUE,
'#maxlength' => 64,
);
$form['hint'] = array(
'#type' => 'textfield',
'#title' => t('Description'),
'#size' => 60,
'#weight' => 2,
'#default_value' => $op == 'new' ? '' : $type->hint,
'#maxlength' => 255,
);
$form['type_button'] = array(
'#type' => 'submit',
'#value' => $op == 'new' ? t('Create New Type') : t('Save'),
'#weight' => 3,
'#submit' => array(
'biblio_admin_author_types_form_submit',
),
);
$form['#redirect'] = 'admin/settings/biblio/author/type';
return $form;
break;
case 'hide':
break;
default:
}
}