瀏覽代碼

Make fixes suggested by @spficklin for multi-page importer.

Lacey Sanderson 5 年之前
父節點
當前提交
258532a5b3
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      tripal/includes/TripalImporter.inc
  2. 1 1
      tripal/includes/tripal.importer.inc

+ 1 - 1
tripal/includes/TripalImporter.inc

@@ -74,7 +74,7 @@ class TripalImporter {
    * Set this to FALSE to exclude the default button. This is useful for
    * multi-page forms which need to change the button text.
    */
-  public static $use_button;
+  public static $use_button = TRUE;
 
   /**
    * Indicates the methods that the file uploader will support.

+ 1 - 1
tripal/includes/tripal.importer.inc

@@ -111,7 +111,7 @@ function tripal_get_importer_form($form, &$form_state, $class) {
   // to change the order of their elements in reference to the default ones.
   $form = array_merge($form, $element_form);
 
-  if (array_key_exists('use_button', $class::$methods) and $class::$methods['use_button'] == TRUE) {
+  if (array_key_exists($class, 'use_button') and $class::$use_button] == TRUE) {
     $form['button'] = [
       '#type' => 'submit',
       '#value' => t($class::$button_text),