From 0183003195598283f76c3bc9d92a76939f335ff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Wed, 10 Jan 2018 15:52:19 -0200 Subject: [PATCH] Use template for getHtmlForExportOptionsQuickExport 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/Export.php | 37 ++++++------------- .../display/export/options_quick_export.twig | 20 ++++++++++ 2 files changed, 31 insertions(+), 26 deletions(-) create mode 100644 templates/display/export/options_quick_export.twig diff --git a/libraries/classes/Display/Export.php b/libraries/classes/Display/Export.php index b7b7889e1d..83b116e41d 100644 --- a/libraries/classes/Display/Export.php +++ b/libraries/classes/Display/Export.php @@ -302,34 +302,19 @@ class Export public static function getHtmlForExportOptionsQuickExport() { global $cfg; - $html = '
'; - $html .= '

' . __('Output:') . '

'; - $html .= '
    '; - $html .= '
  • '; - $html .= '%s'), - htmlspecialchars(Util::userDir($cfg['SaveDir'])) + $saveDir = Util::userDir($cfg['SaveDir']); + $exportIsChecked = (bool) self::exportCheckboxCheck( + 'quick_export_onserver' + ); + $exportOverwriteIsChecked = (bool) self::exportCheckboxCheck( + 'quick_export_onserver_overwrite' ); - $html .= ''; - $html .= '
  • '; - $html .= '
  • '; - $html .= 'render([ + 'save_dir' => $saveDir, + 'export_is_checked' => $exportIsChecked, + 'export_overwrite_is_checked' => $exportOverwriteIsChecked, + ]); } /** diff --git a/templates/display/export/options_quick_export.twig b/templates/display/export/options_quick_export.twig new file mode 100644 index 0000000000..b3bd159f35 --- /dev/null +++ b/templates/display/export/options_quick_export.twig @@ -0,0 +1,20 @@ +
    +

    {% trans 'Output:' %}

    +
      +
    • + + +
    • +
    • + + +
    • +
    +