From dfd8abaae60a94b945201f95238f8aeb219b857f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Thu, 23 Nov 2017 18:44:13 -0200 Subject: [PATCH] Use template for getHtmlForImportOptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MaurĂ­cio Meneghini Fauth --- libraries/classes/Display/Import.php | 36 +++++++-------------------- templates/display/import/options.twig | 12 +++++++++ 2 files changed, 21 insertions(+), 27 deletions(-) create mode 100644 templates/display/import/options.twig diff --git a/libraries/classes/Display/Import.php b/libraries/classes/Display/Import.php index d84513ad23..5383657377 100644 --- a/libraries/classes/Display/Import.php +++ b/libraries/classes/Display/Import.php @@ -105,37 +105,19 @@ class Import /** * Prints Html For Display Export options * - * @param String $import_type Import type: server, database, table - * @param String $db Selected DB - * @param String $table Selected Table + * @param String $importType Import type: server, database, table + * @param String $db Selected DB + * @param String $table Selected Table * * @return string */ - public static function getHtmlForImportOptions($import_type, $db, $table) + public static function getHtmlForImportOptions($importType, $db, $table) { - $html = ' '; - - return $html; + return Template::get('display/import/options')->render([ + 'import_type' => $importType, + 'db' => $db, + 'table' => $table, + ]); } /** diff --git a/templates/display/import/options.twig b/templates/display/import/options.twig new file mode 100644 index 0000000000..52ee928f84 --- /dev/null +++ b/templates/display/import/options.twig @@ -0,0 +1,12 @@ +