function import_admin_form in Import 6
Generates a form containing the stage and process buttons for admins to use.
1 string reference to 'import_admin_form'
- import_menu in ./
import.module
File
- ./
import.module, line 91
Code
function import_admin_form() {
$form['stage'] = array(
'#type' => 'button',
'#value' => t('Stage Data for Import'),
'#executes_submit_callback' => TRUE,
);
// only display the import buttons if there is something staged for import
$import = db_query("SELECT DISTINCT type from {import}");
$types = array();
while ($row = db_fetch_object($import)) {
$types[] = $row->type;
}
if (count($types) > 0) {
foreach ($types as $type) {
$form['process_' . $type] = array(
'#type' => 'button',
'#value' => t('Process') . ' ' . $type,
'#executes_submit_callback' => TRUE,
);
}
}
return $form;
}