diff --git a/libraries/classes/Display/Results.php b/libraries/classes/Display/Results.php index 858edfddbd..6ceec80e59 100644 --- a/libraries/classes/Display/Results.php +++ b/libraries/classes/Display/Results.php @@ -1735,7 +1735,7 @@ class Results /** * Prepare html form for multi row operations * - * @param string $del_lnk the delete link of current row + * @param string $deleteLink the delete link of current row * * @return string $form_html html content * @@ -1743,34 +1743,17 @@ class Results * * @see _getTableHeaders() */ - private function _getFormForMultiRowOperations($del_lnk) + private function _getFormForMultiRowOperations($deleteLink) { - - $form_html = ''; - - if (($del_lnk == self::DELETE_ROW) || ($del_lnk == self::KILL_PROCESS)) { - - $form_html .= '
__get('db'), $this->__get('table'), 1 - ) - . ''; - } - - $form_html .= '
__get('unique_id') . '"'; - $form_html .= '>'; - - return $form_html; - - } // end of the '_getFormForMultiRowOperations()' function - + return Template::get('display/results/multi_row_operations_form')->render([ + 'delete_link' => $deleteLink, + 'delete_row' => self::DELETE_ROW, + 'kill_process' => self::KILL_PROCESS, + 'unique_id' => $this->__get('unique_id'), + 'db' => $this->__get('db'), + 'table' => $this->__get('table'), + ]); + } /** * Get comment for row diff --git a/templates/display/results/multi_row_operations_form.twig b/templates/display/results/multi_row_operations_form.twig new file mode 100644 index 0000000000..bf87c7e0d0 --- /dev/null +++ b/templates/display/results/multi_row_operations_form.twig @@ -0,0 +1,12 @@ +{% if delete_link == delete_row or delete_link == kill_process %} + + {{ Url_getHiddenInputs(db, table, 1) }} + +{% endif %} + +
+