diff --git a/lib/weblib.php b/lib/weblib.php index 95f400479cb..dbfdc9003f6 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -4305,12 +4305,15 @@ function _print_custom_corners_end($idbase) { * @return string / nothing depending on the $return paramter. */ function print_single_button($link, $options, $label='OK', $method='get', $notusedanymore='', - $return=false, $tooltip='', $disabled = false, $jsconfirmmessage='') { + $return=false, $tooltip='', $disabled = false, $jsconfirmmessage='', $formid = '') { $output = ''; + if ($formid) { + $formid = ' id="' . s($formid) . '"'; + } $link = str_replace('"', '"', $link); //basic XSS protection $output .= '