Skip to content

Commit

Permalink
Fix to also allow input type to be specified in ui_opt_textbox sub
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Oct 22, 2024
1 parent 041fa9e commit e2c65cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions authentic.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1180,18 +1180,19 @@ 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,
[[1, $opt1, "onClick='$dis1'"], [0, $opt2 || " ", "onClick='$dis2'"]], $dis) .
"\n";
my $min_width = $size ? '' : ' min-width: 15%;';
$rv .=
"<span><input class='ui_opt_textbox form-control' style='display: inline; width: auto; height: 28px; padding-top: 0; padding-bottom: 2px;$min_width' type='text' name=\""
"<span><input class='ui_opt_textbox form-control' style='display: inline; width: auto; height: 28px; padding-top: 0; padding-bottom: 2px;$min_width' type='$type' name=\""
. &quote_escape($name)
. "\" " . "size=$size value=\"" .
&quote_escape($value) . "\"" . ($dis ? " disabled=true" : "") . ($max ? " maxlength=$max" : "") .
Expand Down

0 comments on commit e2c65cd

Please sign in to comment.