function lingotek_form_alter in Lingotek Translation 6
Same name and namespace in other branches
- 8 lingotek.module \lingotek_form_alter()
- 8.2 lingotek.module \lingotek_form_alter()
- 7.4 lingotek.module \lingotek_form_alter()
- 4.0.x lingotek.module \lingotek_form_alter()
- 3.0.x lingotek.module \lingotek_form_alter()
- 3.1.x lingotek.module \lingotek_form_alter()
- 3.2.x lingotek.module \lingotek_form_alter()
- 3.3.x lingotek.module \lingotek_form_alter()
- 3.4.x lingotek.module \lingotek_form_alter()
- 3.5.x lingotek.module \lingotek_form_alter()
- 3.6.x lingotek.module \lingotek_form_alter()
- 3.7.x lingotek.module \lingotek_form_alter()
- 3.8.x lingotek.module \lingotek_form_alter()
File
- ./
lingotek.module, line 98
Code
function lingotek_form_alter(&$form, $form_state, $form_id) {
if (isset($form['#id']) && strpos($form['#id'], 'node-form') !== FALSE && isset($form['#node']->type)) {
$nid = $form['#parameters'][2]->nid;
//Only give options if the node is new
if (!isset($nid)) {
$form['lingotek'] = array(
'#title' => t('Lingotek Settings'),
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#description' => t("These settings can only be set once, when creating the page."),
'#access' => user_access('access content creation added options'),
);
$form['lingotek']['phaseTemplate'] = array(
'#type' => 'select',
'#title' => t('Phase Template'),
'#default_value' => variable_get('lingotek_phase_template', ''),
'#options' => lingotek_get_phase_templates(),
);
}
}
}