function tripal_bulk_loader_add_loader_job_form
2.x tripal_bulk_loader.loader.inc | tripal_bulk_loader_add_loader_job_form($form, &$form_state, $node) |
3.x tripal_bulk_loader.loader.inc | tripal_bulk_loader_add_loader_job_form( |
1.x tripal_bulk_loader.loader.inc | tripal_bulk_loader_add_loader_job_form($form_state, $node) |
Add Loader Job Form
This form is meant to be included on the node page to allow users to submit/re-submit loading jobs
Related topics
1 string reference to 'tripal_bulk_loader_add_loader_job_form'
- tripal_bulk_loader_base.tpl.php in tripal_bulk_loader/
theme/ templates/ tripal_bulk_loader_base.tpl.php
File
- tripal_bulk_loader/
includes/ tripal_bulk_loader.loader.inc, line 18 - Handles the actual loading of data.
Code
function tripal_bulk_loader_add_loader_job_form($form, &$form_state, $node) {
$form = array();
// --notify--
if ($node->job_status == 'Loading...') {
drupal_set_message(t("The Loading Summary only updates at the end of each constant set.
Although records may have already been inserted, they won't be available until the
current constant set is full loaded and no errors are encountered.", array()), 'warning');
}
$form['nid'] = array(
'#type' => 'hidden',
'#value' => $node->nid,
);
$form['file'] = array(
'#type' => 'hidden',
'#value' => $node->file
);
$form['job_id'] = array(
'#type' => 'hidden',
'#value' => $node->job_id,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => ($node->job_id) ? 'Re-Submit Job' : 'Submit Job',
);
$form['submit-cancel'] = array(
'#type' => ($node->job_id) ? 'submit' : 'hidden',
'#value' => 'Cancel Job',
);
if ($node->keep_track_inserted) {
$form['submit-revert'] = array(
'#type' => ($node->job_id) ? 'submit' : 'hidden',
'#value' => 'Revert',
);
}
return $form;
}