X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FEditCustomFieldDate;h=1ef3851315e48c997ff4181a2dd707e6866b4d4a;hp=c66640fab103eb33fe46d9eb73a02851f6ad9d85;hb=7322f2afedcc2f427e997d1535a503613a83f088;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7 diff --git a/rt/share/html/Elements/EditCustomFieldDate b/rt/share/html/Elements/EditCustomFieldDate index c66640fab..1ef385131 100644 --- a/rt/share/html/Elements/EditCustomFieldDate +++ b/rt/share/html/Elements/EditCustomFieldDate @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -45,12 +45,12 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -% my $name = $NamePrefix.$CustomField->Id.'-Values'; -<& /Elements/SelectDate, Name => "$name", current => 0, ShowTime => 0 &> (<%$DateObj->AsString(Time => 0)%>) +% my $name = $Name || $NamePrefix.$CustomField->Id.'-Values'; +<& /Elements/SelectDate, Name => "$name", current => 0, ShowTime => 0, $KeepValue && $Default ? (Default => $Default) : () &> (<%$DateObj->AsString(Time => 0, Timezone => 'utc')%>) <%INIT> my $DateObj = RT::Date->new ( $session{'CurrentUser'} ); -$DateObj->Set( Format => 'unknown', Value => $Default ); +$DateObj->Set( Format => 'unknown', Value => $Default, Timezone => 'utc' ); <%ARGS> $Object => undef @@ -59,4 +59,6 @@ $NamePrefix => undef $Default => undef $Values => undef $MaxValues => 1 +$Name => undef +$KeepValue => undef