[prev in list] [next in list] [prev in thread] [next in thread]
List: rt-commit
Subject: [Rt-commit] rt branch, 4.0/cf-date-keep-input-value, created. rt-4.0.5-112-g169d749
From: sunnavy () bestpractical ! com (? sunnavy)
Date: 2012-03-28 5:03:43
Message-ID: 20120328050343.5DF332418001 () booth ! bestpractical ! com
[Download RAW message or body]
The branch, 4.0/cf-date-keep-input-value has been created
at 169d74918c7060081ade97381bb2cb4f0324a8b2 (commit)
- Log -----------------------------------------------------------------
commit 169d74918c7060081ade97381bb2cb4f0324a8b2
Author: sunnavy <sunnavy@bestpractical.com>
Date: Wed Mar 28 12:58:58 2012 +0800
we should keep the input value for cf date/datetime
without that, we may lose its value if first "submit" fails.
see #19660
diff --git a/share/html/Elements/EditCustomFieldDate \
b/share/html/Elements/EditCustomFieldDate index c66640f..a1f6679 100644
--- a/share/html/Elements/EditCustomFieldDate
+++ b/share/html/Elements/EditCustomFieldDate
@@ -46,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
% my $name = $NamePrefix.$CustomField->Id.'-Values';
-<& /Elements/SelectDate, Name => "$name", current => 0, ShowTime => 0 &> \
(<%$DateObj->AsString(Time => 0)%>) +<& /Elements/SelectDate, Name => "$name", \
Default => $Default, current => 0, ShowTime => 0 &> (<%$DateObj->AsString(Time => \
0)%>)
<%INIT>
my $DateObj = RT::Date->new ( $session{'CurrentUser'} );
diff --git a/share/html/Elements/EditCustomFieldDateTime \
b/share/html/Elements/EditCustomFieldDateTime index a558884..e64b612 100644
--- a/share/html/Elements/EditCustomFieldDateTime
+++ b/share/html/Elements/EditCustomFieldDateTime
@@ -46,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
% my $name = $NamePrefix.$CustomField->Id.'-Values';
-<& /Elements/SelectDate, Name => "$name", current => 0 &> (<%$DateObj->AsString%>)
+<& /Elements/SelectDate, Name => "$name", Default => $Default, current => 0 &> \
(<%$DateObj->AsString%>)
<%INIT>
my $DateObj = RT::Date->new ( $session{'CurrentUser'} );
diff --git a/share/html/Elements/SelectDate b/share/html/Elements/SelectDate
index 18b42ad..251f58f 100755
--- a/share/html/Elements/SelectDate
+++ b/share/html/Elements/SelectDate
@@ -57,7 +57,7 @@ unless ((defined $Default) or
$year+1900,$mon+1,$mday,
$hour,$min);
}
-$Value = $Value || $Default;
+$Value = $Value || $Default || '';
unless ($Name) {
$Name = $menu_prefix. "_Date";
-----------------------------------------------------------------------
_______________________________________________
Rt-commit mailing list
Rt-commit@lists.bestpractical.com
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic