function tripal_feature_implement_add_chado_properties_navigate
1.x tripal_feature-secondary_tables.inc | tripal_feature_implement_add_chado_properties_navigate($form_state, $step, $nid) |
Related topics
2 string references to 'tripal_feature_implement_add_chado_properties_navigate'
- tripal_feature_add_ALL_dbreferences_page in tripal_feature/
includes/ tripal_feature-db_references.inc - tripal_feature_add_ALL_relationships_page in tripal_feature/
includes/ tripal_feature-relationships.inc
File
- tripal_feature/
includes/ tripal_feature-secondary_tables.inc, line 79 - @todo Add file header description
Code
function tripal_feature_implement_add_chado_properties_navigate($form_state, $step, $nid) {
$form = array();
$form['current_step'] = array(
'#type' => 'hidden',
'#value' => $step
);
// Use this field to set all the steps and the path to each form
// where each step is of the form name;path and each step is separated by ::
$steps = array(
'properties' => 'node/%node/properties',
'db_references' => 'node/%node/db_references',
'relationships' => 'node/%node/relationships'
);
$steps_value = array();
foreach ($steps as $k => $v) {
$steps_value[] = $k . ';' . $v;
}
$form['steps'] = array(
'#type' => 'hidden',
'#value' => implode('::', $steps_value)
);
$form['first_step'] = array(
'#type' => 'hidden',
'#value' => 'properties'
);
$form['last_step'] = array(
'#type' => 'hidden',
'#value' => 'relationships'
);
$form['nid'] = array(
'#type' => 'hidden',
'#value' => $nid
);
if ($step != $form['first_step']['#value']) {
$form['submit-prev'] = array(
'#type' => 'submit',
'#value' => t('Previous Step')
);
}
if ($step != $form['last_step']['#value']) {
$form['submit-next'] = array(
'#type' => 'submit',
'#value' => t('Next Step')
);
}
if ($step == $form['last_step']['#value']) {
$form['submit-finish'] = array(
'#type' => 'submit',
'#value' => t('Finish')
);
}
return $form;
}