From c32b04a7e65ef41a0b70af3d3a164f44bf4fc234 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Thu, 24 Jul 2025 23:31:14 +0300 Subject: [PATCH] Fix to make method configurable --- ui-lib.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ui-lib.pl b/ui-lib.pl index 36488827b..3a1e71171 100755 --- a/ui-lib.pl +++ b/ui-lib.pl @@ -1602,7 +1602,7 @@ return &theme_ui_buttons_end(@_) if (defined(&theme_ui_buttons_end)); return "\n"; } -=head2 ui_buttons_row(script, button-label, description, [hiddens], [after-submit], [before-submit]) +=head2 ui_buttons_row(script, button-label, description, [hiddens], [after-submit], [before-submit], [postmethod]) Returns HTML for a button with a description next to it, and perhaps other inputs. The parameters are : @@ -1619,15 +1619,18 @@ inputs. The parameters are : =item before-submit - HTML for text or inputs to appear before the submit button. +=item postmethod - Defines the method used to submit the form. Defaults to 'post'. + =cut sub ui_buttons_row { return &theme_ui_buttons_row(@_) if (defined(&theme_ui_buttons_row)); -my ($script, $label, $desc, $hiddens, $after, $before) = @_; +my ($script, $label, $desc, $hiddens, $after, $before, $postmethod) = @_; +$postmethod ||= 'post'; if (ref($hiddens)) { $hiddens = join("\n", map { &ui_hidden(@$_) } @$hiddens); } -return "
\n". +return "\n". $hiddens. " ". "".