Commit 0e46f07f authored by sunnavy's avatar sunnavy
Browse files

fill the date cf inputs when creating tickets/txns

so they don't get missed when user clicks "add more files" or something like that.
parent 3433e121
......@@ -46,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
% my $name = $Name || $NamePrefix.$CustomField->Id.'-Values';
<& /Elements/SelectDate, Name => "$name", current => 0, ShowTime => 0 &> (<%$DateObj->AsString(Time => 0, Timezone => 'utc')%>)
<& /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'} );
......@@ -60,4 +60,5 @@ $Default => undef
$Values => undef
$MaxValues => 1
$Name => undef
$KeepValue => undef
</%ARGS>
......@@ -46,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
% my $name = $Name || $NamePrefix.$CustomField->Id.'-Values';
<& /Elements/SelectDate, Name => "$name", current => 0 &> (<%$DateObj->AsString%>)
<& /Elements/SelectDate, Name => "$name", current => 0, $KeepValue && $Default ? (Default => $Default) : () &> (<%$DateObj->AsString($KeepValue ? ( Timezone => 'utc' ) : () )%>)
<%INIT>
my $DateObj = RT::Date->new ( $session{'CurrentUser'} );
......@@ -61,4 +61,5 @@ $Values => undef
$MaxValues => 1
$Name => undef
$Format => 'ISO'
$KeepValue => undef
</%ARGS>
......@@ -105,8 +105,9 @@
CustomFields => $QueueObj->TicketCustomFields,
Grouping => 'Basics',
InTable => 1,
KeepValue => 1,
&>
<& /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1 &>
<& /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj => $QueueObj, InTable => 1, KeepValue => 1, &>
</table>
</&>
% $m->callback( CallbackName => 'AfterBasics', QueueObj => $QueueObj, ARGSRef => \%ARGS );
......@@ -115,6 +116,7 @@
%ARGS,
Object => $ticket,
CustomFieldGenerator => sub { $QueueObj->TicketCustomFields },
KeepValue => 1,
&>
</div>
......@@ -169,6 +171,7 @@
CustomFields => $QueueObj->TicketCustomFields,
Grouping => 'People',
InTable => 1,
KeepValue => 1,
&>
<tr>
......@@ -263,6 +266,7 @@
CustomFields => $QueueObj->TicketCustomFields,
Grouping => 'Dates',
InTable => 1,
KeepValue => 1,
&>
</table>
</&>
......
......@@ -59,6 +59,7 @@
</<% $CELL %>>
<<% $CELL %>>
<& /Elements/EditCustomField,
%ARGS,
CustomField => $CF,
Object => RT::Transaction->new( $session{'CurrentUser'} ),
&>
......
......@@ -113,7 +113,7 @@
</td>
</tr>
<tr><td colspan="2"><& /Ticket/Elements/EditTransactionCustomFields, %ARGS, TicketObj => $Ticket &></td></tr>
<tr><td colspan="2"><& /Ticket/Elements/EditTransactionCustomFields, %ARGS, TicketObj => $Ticket, KeepValue => 1, &></td></tr>
<& /Ticket/Elements/AddAttachments, %ARGS, TicketObj => $Ticket &>
......
......@@ -134,7 +134,7 @@
% $m->callback( %ARGS, CallbackName => 'AfterWorked', Ticket => $TicketObj );
<& /Ticket/Elements/EditTransactionCustomFields, %ARGS, TicketObj => $TicketObj, InTable => 1 &>
<& /Ticket/Elements/EditTransactionCustomFields, %ARGS, TicketObj => $TicketObj, InTable => 1, KeepValue => 1, &>
</table>
</&>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment