[Rt-commit] r3262 - in rt/branches/CHALDEA-EXPERIMENTAL: .
html/Ticket/Elements
alexmv at bestpractical.com
alexmv at bestpractical.com
Wed Jun 29 01:25:05 EDT 2005
Author: alexmv
Date: Wed Jun 29 01:25:04 2005
New Revision: 3262
Modified:
rt/branches/CHALDEA-EXPERIMENTAL/ (props changed)
rt/branches/CHALDEA-EXPERIMENTAL/html/Ticket/Elements/Reminders
Log:
r4492 at zoq-fot-pik: chmrr | 2005-06-28 21:22:25 -0400
* Only update reminders if we actually were submitting on them
* Don't open reminders if we didn't have a checkbox for them
Modified: rt/branches/CHALDEA-EXPERIMENTAL/html/Ticket/Elements/Reminders
==============================================================================
--- rt/branches/CHALDEA-EXPERIMENTAL/html/Ticket/Elements/Reminders (original)
+++ rt/branches/CHALDEA-EXPERIMENTAL/html/Ticket/Elements/Reminders Wed Jun 29 01:25:04 2005
@@ -12,16 +12,15 @@
my $reminder_collection = $Ticket->Reminders->Collection;
-while (my $reminder = $reminder_collection->Next) {
- # If they've just checked the box, make sure we resolve it
- if ($reminder->Status ne 'resolved'
- && $request_args->{'Complete-Reminder-'.$reminder->id}) {
- $reminder->SetStatus('resolved');
- }
- elsif ($reminder->Status eq 'resolved' && ! $request_args->{'Complete-Reminder-'.$reminder->id}) {
- $reminder->SetStatus('open');
- }
-
+if ($request_args->{'update-reminders'}) {
+ while (my $reminder = $reminder_collection->Next) {
+ if ($reminder->Status ne 'resolved'
+ && $request_args->{'Complete-Reminder-'.$reminder->id}) {
+ $reminder->SetStatus('resolved');
+ } elsif ($reminder->Status eq 'resolved' && ! $request_args->{'Complete-Reminder-'.$reminder->id}) {
+ $reminder->SetStatus('open');
+ }
+ }
}
@@ -55,11 +54,15 @@
$reminder_collection = $Ticket->Reminders->Collection;
</%init>
-<input type="hidden" name="id" value="<%$Ticket->id%>">
+<input type="hidden" name="id" value="<%$Ticket->id%>" />
+<input type="hidden" name="update-reminders" value="1" />
% while (my $reminder = $reminder_collection->Next) {
-% next if ($reminder->Status eq 'resolved' && !$ShowCompleted);
+% if ($reminder->Status eq 'resolved' && !$ShowCompleted) {
+<input type="hidden" name="Complete-Reminder-<% $reminder->id %>" value="1" />
+% } else {
<& SELF:ShowEntry, Reminder => $reminder, Ticket => $Ticket &>
% }
+% }
<br />
<br />
<&|/l&>New reminder:</&><br />
More information about the Rt-commit
mailing list