|
@@ -94,9 +94,18 @@ function tripal_get_importer_form($form, &$form_state, $class) {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ // Retrieve the forms from the custom TripalImporter class
|
|
|
+ // for this loader.
|
|
|
$importer = new $class();
|
|
|
$element = array();
|
|
|
- $form['class_elements'] = $importer->form($element, $form_state);
|
|
|
+ $element_form = $importer->form($element, $form_state);
|
|
|
+ // Quick check to make sure we had an array returned so array_merge() works.
|
|
|
+ if (!is_array($element_form)) $element_form = arry();
|
|
|
+
|
|
|
+ // Merge the custom form with our default one.
|
|
|
+ // This way, the custom TripalImporter can use the #weight property
|
|
|
+ // to change the order of their elements in reference to the default ones.
|
|
|
+ $form = array_merge($form, $element_form);
|
|
|
|
|
|
$form['button'] = array(
|
|
|
'#type' => 'submit',
|