public function biblio_handler_field_contributor::options_form in Bibliography Module 7
Same name and namespace in other branches
- 6.2 views/biblio_handler_field_contributor.inc \biblio_handler_field_contributor::options_form()
- 6 views/biblio_handler_field_contributor.inc \biblio_handler_field_contributor::options_form()
- 7.2 views/biblio_handler_field_contributor.inc \biblio_handler_field_contributor::options_form()
Default options form provides the label widget that all fields should have.
Overrides biblio_handler_field::options_form
File
- views/
biblio_handler_field_contributor.inc, line 39
Class
Code
public function options_form(&$form, &$form_state) {
$form['auth_category'] = array(
'#type' => 'select',
'#title' => t('Category of Author'),
'#default_value' => $this->options['auth_category'],
'#options' => array(
0 => t('All categories'),
1 => t('Primary'),
2 => t('Secondary'),
3 => t('Tertiary'),
4 => t('Subsidiary'),
5 => t('Corporate/Institutional'),
),
);
$form['formatting'] = array(
'#type' => 'fieldset',
'#title' => t('Author format'),
'#collapsible' => TRUE,
);
$form['name_order'] = array(
'#type' => 'select',
'#title' => t('Name order'),
'#default_value' => $this->options['name_order'],
'#options' => array(
'first-last' => t('First name first'),
'last-first' => t('Last name first'),
),
'#description' => t('The order that first and last names appear for each author.'),
'#fieldset' => 'formatting',
);
$form['initialize'] = array(
'#type' => 'checkbox',
'#title' => t('Shorten given names'),
'#default_value' => $this->options['initialize'],
'#description' => t('Shorten given names to single initial each.'),
'#fieldset' => 'formatting',
);
$form['short_form'] = array(
'#type' => 'checkbox',
'#title' => t('Show only "family" names'),
'#default_value' => $this->options['short_form'],
'#description' => t('Show only family name, no first name or initials.'),
'#fieldset' => 'formatting',
);
$form['separators'] = array(
'#type' => 'fieldset',
'#title' => t('Separators'),
'#collapsible' => TRUE,
);
$form['initialize_with'] = array(
'#type' => 'textfield',
'#size' => 5,
'#title' => t('Initial separator'),
'#default_value' => $this->options['initialize_with'],
'#description' => t('Enter the character (if any) which will be used to separate the initials.'),
'#fieldset' => 'separators',
);
$form['sort_separator'] = array(
'#type' => 'textfield',
'#size' => 5,
'#title' => t('Sort separator'),
'#default_value' => $this->options['sort_separator'],
'#description' => t('Enter the character which will be used to separate the last name from the first name (or initials) when displayed last name first (Smith, John).'),
'#fieldset' => 'separators',
);
$form['separator'] = array(
'#type' => 'textfield',
'#size' => 5,
'#title' => t('Author separator'),
'#default_value' => $this->options['separator'],
'#required' => TRUE,
'#description' => t('Enter the character which will be used to separate the authors (Smith, John; Doe, Jane).'),
'#fieldset' => 'separators',
);
parent::options_form($form, $form_state);
}