diff options
author | Maurício Meneghini Fauth <mauriciofauth@gmail.com> | 2017-11-10 20:08:28 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauriciofauth@gmail.com> | 2017-11-10 20:08:28 +0300 |
commit | 72bcc1336f4986e9f2b3aa9c9ffe590284de7b65 (patch) | |
tree | 46120f8c757d400fb1e5f15e706009d456d0d838 /libraries/classes/Config | |
parent | e7900a82cbdb3875a47ba405ebf9f8efae5d5c22 (diff) |
Use template for displayFieldsetBottom
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Diffstat (limited to 'libraries/classes/Config')
-rw-r--r-- | libraries/classes/Config/FormDisplayTemplate.php | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/libraries/classes/Config/FormDisplayTemplate.php b/libraries/classes/Config/FormDisplayTemplate.php index d4dff1997b..cb82e32a79 100644 --- a/libraries/classes/Config/FormDisplayTemplate.php +++ b/libraries/classes/Config/FormDisplayTemplate.php @@ -413,30 +413,16 @@ class FormDisplayTemplate /** * Displays bottom part of a fieldset * - * @param bool $show_buttons whether show submit and reset button + * @param bool $showButtons Whether show submit and reset button * * @return string */ - public static function displayFieldsetBottom($show_buttons = true) + public static function displayFieldsetBottom($showButtons = true) { - $colspan = 2; - if ($GLOBALS['PMA_Config']->get('is_setup')) { - $colspan++; - } - $htmlOutput = ''; - if ($show_buttons) { - $htmlOutput .= '<tr>'; - $htmlOutput .= '<td colspan="' . $colspan . '" class="lastrow">'; - $htmlOutput .= '<input type="submit" name="submit_save" value="' - . __('Apply') . '" class="green" />'; - $htmlOutput .= '<input type="button" name="submit_reset" value="' - . __('Reset') . '" />'; - $htmlOutput .= '</td>'; - $htmlOutput .= '</tr>'; - } - $htmlOutput .= '</table>'; - $htmlOutput .= '</fieldset>'; - return $htmlOutput; + return Template::get('config/form_display/fieldset_bottom')->render([ + 'show_buttons' => $showButtons, + 'is_setup' => $GLOBALS['PMA_Config']->get('is_setup'), + ]); } /** |