beginning importers options form

This commit is contained in:
Leo Germani 2018-07-02 09:55:40 -03:00
parent 24d4106b37
commit 221c7df55d
2 changed files with 16 additions and 0 deletions

View File

@ -71,4 +71,13 @@ class CSV extends Importer {
return false;
}
public function options_form() {
$form = '<label class="label">' . __('Delimiter', 'tainacan') . '</label>';
$form .= '<input type="text" class="input" name="delimiter" value="' . $this->get_option('delimiter') . '" />';
return $form;
}
}

View File

@ -192,6 +192,7 @@ abstract class Importer {
$return['manual_collection'] = $this->manual_collection;
$return['manual_mapping'] = $this->manual_mapping;
$return['accepts'] = $this->accepts;
$return['options_form'] = $this->options_form();
}
return $return;
@ -680,6 +681,12 @@ abstract class Importer {
public function get_source_number_of_items() {}
/**
* Method implemented by child importer to return the HTML of the Options Form to be rendered in the Importer page
*/
public function options_form() {}
////////////////////////////////////////
// Core methods