diff options
author | mark <mark> | 2011-08-23 21:45:51 +0000 |
---|---|---|
committer | mark <mark> | 2011-08-23 21:45:51 +0000 |
commit | 4c8c18409f82d56320a80f6c94f275fa15486897 (patch) | |
tree | deeb2cb64572fb1cd00cb55be48eaa68a69d9984 /rt/share/html | |
parent | 006b2392be94f9670eddf3d01ba89c00f9c16c05 (diff) |
RT future ticket resolve, #13853
Diffstat (limited to 'rt/share/html')
-rwxr-xr-x | rt/share/html/Elements/SelectStatus | 4 | ||||
-rwxr-xr-x | rt/share/html/Ticket/Elements/EditDates | 6 | ||||
-rwxr-xr-x | rt/share/html/Ticket/Elements/ShowDates | 7 | ||||
-rwxr-xr-x | rt/share/html/Ticket/Update.html | 36 |
4 files changed, 51 insertions, 2 deletions
diff --git a/rt/share/html/Elements/SelectStatus b/rt/share/html/Elements/SelectStatus index 7aa7aa528..5718a2a9d 100755 --- a/rt/share/html/Elements/SelectStatus +++ b/rt/share/html/Elements/SelectStatus @@ -45,7 +45,8 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<select name="<%$Name%>"> +% my $onchange_attr = $onchange ? " onchange=\"$onchange\"" : ''; +<select id="<%$Name%>" name="<%$Name%>"<% $onchange_attr |n%>> %if ($DefaultValue) { <option value=""<% !$Default && qq[ selected="selected"] |n %>><%$DefaultLabel%></option> %} @@ -64,4 +65,5 @@ $Default => '' $SkipDeleted => 0 $DefaultValue => 1 $DefaultLabel => "-" +$onchange => '' </%ARGS> diff --git a/rt/share/html/Ticket/Elements/EditDates b/rt/share/html/Ticket/Elements/EditDates index bfa3a3049..371f6e31e 100755 --- a/rt/share/html/Ticket/Elements/EditDates +++ b/rt/share/html/Ticket/Elements/EditDates @@ -70,6 +70,12 @@ <& /Elements/SelectDate, menu_prefix => 'Due', current => 0 &> (<% $TicketObj->DueObj->AsString %>) </td> </tr> + <tr> + <td class="label"><&|/l&>Close After</&>:</td> + <td class="entry"> + <& /Elements/SelectDate, menu_prefix => 'WillResolve', current => 0 &> (<% $TicketObj->WillResolveObj->AsString %>) + </td> + </tr> % $m->callback( %ARGS, CallbackName => 'EndOfList', Ticket => $TicketObj ); </table> <%ARGS> diff --git a/rt/share/html/Ticket/Elements/ShowDates b/rt/share/html/Ticket/Elements/ShowDates index 1a79628a9..fc0146194 100755 --- a/rt/share/html/Ticket/Elements/ShowDates +++ b/rt/share/html/Ticket/Elements/ShowDates @@ -75,6 +75,13 @@ <td class="label date resolved"><&|/l&>Closed</&>:</td> <td class="value date resolved"><% $Ticket->ResolvedObj->AsString %></td> </tr> +% my $willresolve = $Ticket->WillResolveObj; +% if ( $willresolve && $willresolve->Unix > 0 ) { + <tr> + <td class="label date willresolve"><&|/l&>Will Resolve</&>:</td> + <td class="value date willresolve"><% $willresolve->AsString %></td> + </tr> +% } # else don't display either of them <tr> <td class="label date updated"><&|/l&>Updated</&>:</td> % my $UpdatedString = $Ticket->LastUpdated ? loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $m->scomp('/Elements/ShowUser', User => $Ticket->LastUpdatedByObj)) : loc("Never"); diff --git a/rt/share/html/Ticket/Update.html b/rt/share/html/Ticket/Update.html index 62db0d1c3..7c28cc30d 100755 --- a/rt/share/html/Ticket/Update.html +++ b/rt/share/html/Ticket/Update.html @@ -67,7 +67,29 @@ <tr><td valign="baseline" class="label"><&|/l&>Status</&>:</td> <td valign="baseline"> -<& /Elements/SelectStatus, Name=>"Status", DefaultLabel => loc("[_1] (Unchanged)", loc($TicketObj->Status)), Default => $ARGS{'Status'} || ($TicketObj->Status eq $DefaultStatus ? undef : $DefaultStatus)&> +<script type="text/javascript"> +function changeStatus() { + var Status_select = document.getElementById('Status'); + var x = Status_select.options[Status_select.selectedIndex].value; + var text = document.getElementById('WillResolve_Date'); + var button = document.getElementById('WillResolve_Date_date_button'); + if (x == 'resolved' || x == 'rejected' || x == 'deleted') { + text.disabled = true; + button.style.display = 'none'; + } + else { + text.disabled = false; + button.style.display = 'inline'; + } +} +</script> +<& /Elements/SelectStatus, + Name=>"Status", + DefaultLabel => loc("[_1] (Unchanged)", loc($TicketObj->Status)), + Default => $ARGS{'Status'} + || ($TicketObj->Status eq $DefaultStatus ? undef : $DefaultStatus, + onchange => 'changeStatus()' +)&> <span class="label"><&|/l&>Owner</&>:</span> <& /Elements/SelectOwner, Name => "Owner", @@ -76,6 +98,18 @@ DefaultLabel => loc("[_1] (Unchanged)", $m->scomp('/Elements/ShowUser', User => $TicketObj->OwnerObj)), Default => $ARGS{'Owner'} &> +<span class="label"><&|/l&>Close this Ticket on</&>:</span> +<& /Elements/SelectDate, + menu_prefix => 'WillResolve', + current => 0, + ShowTime => 0, +&> +% if ( $TicketObj->WillResolve ) { +<span class="label"> (<% $TicketObj->WillResolveObj->AsString %>)</span> +% } +<script type="text/javascript"> +changeStatus(); +</script> </td> <td rowspan=4 valign="top"> <table style="float:right;"> |