From e2c65cd8208cdea288fad78ec50fc257d3c0e1df Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Tue, 22 Oct 2024 15:52:55 +0300 Subject: [PATCH] Fix to also allow input type to be specified in `ui_opt_textbox` sub https://github.com/virtualmin/virtualmin-gpl/commit/e8b030b88fa66b0f004aed31b3604e596b469214#r148191064 --- authentic.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/authentic.pl b/authentic.pl index 5271cca3c..ee466c30d 100644 --- a/authentic.pl +++ b/authentic.pl @@ -1180,10 +1180,11 @@ sub theme_ui_table_hr sub theme_ui_opt_textbox { - my ($name, $value, $size, $opt1, $opt2, $dis, $extra, $max, $tags) = @_; + my ($name, $value, $size, $opt1, $opt2, $dis, $extra, $max, $tags, $type) = @_; my $dis1 = &js_disable_inputs([$name, (defined($extra) ? @$extra : ())], []); my $dis2 = &js_disable_inputs([], [$name, (defined($extra) ? @$extra : ())]); my $rv; + $type ||= 'text'; $size = &ui_max_text_width($size); $rv .= &ui_radio($name . "_def", $value eq '' ? 1 : 0, @@ -1191,7 +1192,7 @@ sub theme_ui_opt_textbox "\n"; my $min_width = $size ? '' : ' min-width: 15%;'; $rv .= -"