Francois Gouget : testbot/web: Limit the width of edit fields so they fit in the page.

Alexandre Julliard julliard at winehq.org
Fri Aug 31 12:51:18 CDT 2012


Module: tools
Branch: master
Commit: 272e20d5fee513499fbc5aa5e342d1dcbd30e649
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=272e20d5fee513499fbc5aa5e342d1dcbd30e649

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Fri Aug 31 17:17:40 2012 +0200

testbot/web: Limit the width of edit fields so they fit in the page.

---

 testbot/lib/ObjectModel/CGI/FormPage.pm |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/testbot/lib/ObjectModel/CGI/FormPage.pm b/testbot/lib/ObjectModel/CGI/FormPage.pm
index a3d2a8d..93edc40 100644
--- a/testbot/lib/ObjectModel/CGI/FormPage.pm
+++ b/testbot/lib/ObjectModel/CGI/FormPage.pm
@@ -272,9 +272,10 @@ sub GenerateField
     }
     else
     {
+      my $Size=$PropertyDescriptor->GetMaxLength();
+      $Size=45 if ($Size > 45);
       print "<input type='$InputType' name='", $PropertyDescriptor->GetName(),
-            "' maxlength='", $PropertyDescriptor->GetMaxLength(), "' size='",
-            $PropertyDescriptor->GetMaxLength(), "'";
+            "' maxlength='", $PropertyDescriptor->GetMaxLength(), "' size='$Size'";
       if ($Value && $InputType ne "password")
       {
         print " value='", $self->CGI->escapeHTML($Value), "'";




More information about the wine-cvs mailing list