From: Mark Wells Date: Thu, 19 Apr 2012 18:35:15 +0000 (-0700) Subject: keep form values when changing queue in ticket creation, #9853 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=91665162a95f509b21b902d9670fb6f8f20c3184 keep form values when changing queue in ticket creation, #9853 --- diff --git a/rt/share/html/Ticket/Create.html b/rt/share/html/Ticket/Create.html index 6ea2c9f39..57e3bd476 100755 --- a/rt/share/html/Ticket/Create.html +++ b/rt/share/html/Ticket/Create.html @@ -45,6 +45,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} +%# use Data::Dumper; warn Dumper \%ARGS; #DEBUG <& /Elements/Header, Title => $title, onload => "function () { hide(document.getElementById('Ticket-Create-details')) }" &> @@ -71,7 +72,7 @@ Default => $QueueObj->Name, ShowNullOption => 0, ShowAllQueues => 0, - OnChange => "document.getElementsByName('id')[0].value = ''; form.submit()" &> + OnChange => "document.getElementsByName('id')[0].value = 'refresh'; form.submit()" &> <&|/l&>Status: @@ -91,7 +92,7 @@ <&|/l&>Requestors: -<& /Elements/EmailInput, Name => 'Requestors', Size => '40', Default => $ARGS{Requestors} || $session{CurrentUser}->EmailAddress &> +<& /Elements/EmailInput, Name => 'Requestors', Size => '40', Default => exists($ARGS{Requestors}) ? $ARGS{Requestors} : $session{CurrentUser}->EmailAddress &> % $m->callback( CallbackName => 'AfterRequestors', QueueObj => $QueueObj, ARGSRef => \%ARGS ); @@ -390,7 +391,8 @@ if ($ARGS{'Attach'}) { # attachment? # }}} # delete temporary storage entry to make WebUI clean -unless (keys %{$session{'Attachments'}} and $ARGS{'id'} eq 'new') { +unless (keys %{$session{'Attachments'}} and + ($ARGS{'id'} eq 'new' or $ARGS{'id'} eq 'refresh')) { delete $session{'Attachments'}; }