[Bps-public-commit] rt-extension-formtools branch, master, updated. 0.16-9-gfcd6bf4

Alex Vandiver alexmv at bestpractical.com
Wed May 28 13:21:19 EDT 2014


The branch, master has been updated
       via  fcd6bf4db066ce6aa83c948e23a8d83e44836a22 (commit)
       via  7a30a5002599dba136001ee0b95dbbeb83e4b504 (commit)
      from  d3b4801babd801ac580b6f2afd291828db4b9c8e (commit)

Summary of changes:
 html/FormTools/Field | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 7a30a5002599dba136001ee0b95dbbeb83e4b504
Author: Matt Zagrabelny <mzagrabe at d.umn.edu>
Date:   Tue May 20 16:02:58 2014 -0500

    defer to EmailInput default Size if cols is undefined
    
    EmailInput already has a default Size value if it is not passed in -
    currently at '40'. Deferring to that value allows for a more consistent
    look to EmailInput elements created via FormTools without duplicating the
    constant value (40).
    
    Check exists $ARGS{cols} to allow for explicitly passing cols => undef,
    which produces an input with no "size" set.

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 35accdc..0f8e1f3 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -165,7 +165,12 @@ $default = '' unless defined $default;
 % }
 
 % } elsif ($name =~ /^(Requestors|Cc|AdminCc)$/ ) {
-<& /Elements/EmailInput, Name => $name, Size => ($cols||20), Default => $default, AutocompleteMultiple => 1 &>
+<& /Elements/EmailInput,
+    Name                 => $name,
+    Default              => $default,
+    AutocompleteMultiple => 1,
+    (exists $ARGS{cols} ? (Size => $cols) : ()),
+&>
 % } elsif ( $name eq "Due" ) {
 <& /Elements/SelectDate, Name => $name, Default => $default, current => 0, Size => ($cols || 20) &>
 % } else {

commit fcd6bf4db066ce6aa83c948e23a8d83e44836a22
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed May 28 13:18:37 2014 -0400

    Pick up default size of Date fields from the SelectDate widget

diff --git a/html/FormTools/Field b/html/FormTools/Field
index 0f8e1f3..cb493ad 100644
--- a/html/FormTools/Field
+++ b/html/FormTools/Field
@@ -172,7 +172,7 @@ $default = '' unless defined $default;
     (exists $ARGS{cols} ? (Size => $cols) : ()),
 &>
 % } elsif ( $name eq "Due" ) {
-<& /Elements/SelectDate, Name => $name, Default => $default, current => 0, Size => ($cols || 20) &>
+<& /Elements/SelectDate, Name => $name, Default => $default, current => 0, (defined $cols ? (Size => $cols) : ()) &>
 % } else {
 <input type="text" name="<%$name%>" size="<% $cols || 20 %>" value="<%$default%>">
 % }

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list