function tripal_stock_add_chado_properties_navigate
1.x tripal_stock-secondary_tables.inc | tripal_stock_add_chado_properties_navigate($form_state, $step, $nid) |
Related topics
3 string references to 'tripal_stock_add_chado_properties_navigate'
- tripal_stock_add_ALL_dbreferences_page in tripal_stock/
includes/ tripal_stock-db_references.inc - Display the ADD Database References to Stock Page
- tripal_stock_add_ALL_property_page in tripal_stock/
includes/ tripal_stock-properties.inc - tripal_stock_add_ALL_relationships_page in tripal_stock/
includes/ tripal_stock-relationships.inc
File
- tripal_stock/
includes/ tripal_stock-secondary_tables.inc, line 79 - @todo Add file header description
Code
function tripal_stock_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;
}