Use text area for big text fields

This commit is contained in:
Jamie Cameron
2008-08-26 05:27:52 +00:00
parent 6a8318952c
commit f381c6a1ca

View File

@@ -299,8 +299,17 @@ if ($total || $in{'new'}) {
}
elsif ($str[$j]->{'type'} =~ /\((\d+)\)/) {
# Show as known-size text
local $nw = $1 > 70 ? 70 : $1;
$et .= &ui_textbox($nm, $d[$j], $nw);
if ($1 > 255) {
# Too big, use text area
$et .= &ui_textarea(
$nm, $d[$j], 5, 70);
}
else {
# Text box
local $nw = $1 > 70 ? 70 : $1;
$et .= &ui_textbox(
$nm, $d[$j], $nw);
}
}
elsif (&is_blob($str[$j])) {
# Show as multiline text