[Rt-commit] rt branch, 4.2/date-input-keep-value, updated. rt-4.0.6-338-g91dce79

Alex Vandiver alexmv at bestpractical.com
Mon Dec 10 16:03:52 EST 2012


The branch, 4.2/date-input-keep-value has been updated
       via  91dce796c852f837271ff9deaf54ab9ffe3e49a2 (commit)
      from  1706c741c58cd9770e3ddd580dec7c82d5cab0cc (commit)

Summary of changes:
 share/html/Elements/SelectDate | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 91dce796c852f837271ff9deaf54ab9ffe3e49a2
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Dec 10 16:01:45 2012 -0500

    Remove unused Value argument to SelectDate
    
    8fea92b added Value to the arguments.  However, the issues ticket it
    references claims that it's so Ticket/Create.html is sticky -- but as of
    8fea92b, Ticket/Create.html was passing SelectDate Default =>, not Value
    =>.  Ticket/Create.html, the one call site which passed Value =>, was
    fixed to use the standard Default in a00a733, prior to 8fea92b.

diff --git a/share/html/Elements/SelectDate b/share/html/Elements/SelectDate
index 251f58f..b78f86d 100755
--- a/share/html/Elements/SelectDate
+++ b/share/html/Elements/SelectDate
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 % $m->callback( %ARGS, Name => $Name, CallbackName => 'BeforeDateInput' );
-<input type="text" class="ui-datepicker<% $ShowTime ? ' withtime' : '' %>" id="<% $Name %>" name="<% $Name %>" value="<% $Value %>" size="<% $Size %>" />
+<input type="text" class="ui-datepicker<% $ShowTime ? ' withtime' : '' %>" id="<% $Name %>" name="<% $Name %>" value="<% $Default %>" size="<% $Size %>" />
 % $m->callback( %ARGS, Name => $Name, CallbackName => 'AfterDateInput' );
 <%init>
 unless ((defined $Default) or 
@@ -57,7 +57,7 @@ unless ((defined $Default) or
                            $year+1900,$mon+1,$mday,                            
                            $hour,$min);   
 }
-$Value = $Value || $Default || '';
+$Default ||= '';
 
 unless ($Name) {
 	$Name = $menu_prefix. "_Date";
@@ -70,7 +70,6 @@ $ShowTime => 1
 $menu_prefix=>''
 $current=>time
 $Default => ''
-$Value => ''
 $Name => undef
 $Size => 16
 </%args>

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


More information about the Rt-commit mailing list