diff --git a/ui-lib.pl b/ui-lib.pl index 20ba3af96..7b044216f 100755 --- a/ui-lib.pl +++ b/ui-lib.pl @@ -1835,7 +1835,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], [postmethod]) +=head2 ui_buttons_row(script, button-label, description, [hiddens], [after-submit], [before-submit], [postmethod], [single-cell]) Returns HTML for a button with a description next to it, and perhaps other inputs. The parameters are : @@ -1854,11 +1854,14 @@ inputs. The parameters are : =item postmethod - Defines the method used to submit the form. Defaults to 'post'. +=item single-cell - If set to 1, omits the description cell and spans the button cell across both columns. + =cut sub ui_buttons_row { return &theme_ui_buttons_row(@_) if (defined(&theme_ui_buttons_row)); -my ($script, $label, $desc, $hiddens, $after, $before, $postmethod) = @_; +my ($script, $label, $desc, $hiddens, $after, $before, $postmethod, + $singlecell) = @_; $postmethod ||= 'post'; if (ref($hiddens)) { $hiddens = join("\n", map { &ui_hidden(@$_) } @$hiddens); @@ -1866,11 +1869,14 @@ if (ref($hiddens)) { return "
\n". $hiddens. " ". - "". + "". ($before ? $before." " : ""). &ui_submit($label).($after ? " ".$after : "")."\n". - "". - $desc."\n". + ($singlecell ? "" : + "". + $desc."\n"). + "\n". "
\n"; }