summaryrefslogtreecommitdiff
path: root/rt/share/html/Callbacks
diff options
context:
space:
mode:
authormark <mark>2011-05-31 23:30:13 +0000
committermark <mark>2011-05-31 23:30:13 +0000
commite02e5448d8fdad322dbe5562f92d9623e5d6f0dd (patch)
tree0b7385d69d9a8bac89f8d7387387faa8eb55ac2e /rt/share/html/Callbacks
parentdd65ba99bb9281571f19744154a3b03bcd3f01ab (diff)
improve mandatory fields, #9260
Diffstat (limited to 'rt/share/html/Callbacks')
-rw-r--r--rt/share/html/Callbacks/CheckMandatoryFields/Ticket/Elements/Tabs/Default12
-rw-r--r--rt/share/html/Callbacks/CheckMandatoryFields/Ticket/Modify.html/BeforeActionList15
-rw-r--r--rt/share/html/Callbacks/CheckMandatoryFields/Ticket/Update.html/BeforeDisplay24
3 files changed, 0 insertions, 51 deletions
diff --git a/rt/share/html/Callbacks/CheckMandatoryFields/Ticket/Elements/Tabs/Default b/rt/share/html/Callbacks/CheckMandatoryFields/Ticket/Elements/Tabs/Default
deleted file mode 100644
index 2c0698ec2..000000000
--- a/rt/share/html/Callbacks/CheckMandatoryFields/Ticket/Elements/Tabs/Default
+++ /dev/null
@@ -1,12 +0,0 @@
-<%doc>
-If mandatory fields aren't set yet, point the "Resolve" link back
-to "Ticket Basics".
-</%doc>
-<%init>
-my $TicketObj = delete($ARGS{'Ticket'});
-my $actions = $ARGS{'actions'};
-if( $m->comp('/Ticket/Elements/CheckMandatoryFields', Ticket => $TicketObj)
- ) {
- $actions->{'G'}->{'path'} = 'Ticket/Modify.html?id='.$TicketObj->Id.'&resolve=1';
-}
-</%init>
diff --git a/rt/share/html/Callbacks/CheckMandatoryFields/Ticket/Modify.html/BeforeActionList b/rt/share/html/Callbacks/CheckMandatoryFields/Ticket/Modify.html/BeforeActionList
deleted file mode 100644
index 4779411ce..000000000
--- a/rt/share/html/Callbacks/CheckMandatoryFields/Ticket/Modify.html/BeforeActionList
+++ /dev/null
@@ -1,15 +0,0 @@
-<%init>
-use Data::Dumper;
-my $ARGSRef = $ARGS{'ARGSRef'};
-my $TicketObj = $ARGS{'Ticket'};
-my $results = $ARGS{'Actions'};
-if(defined($ARGSRef->{'resolve'})) {
- my @errors =
- $m->comp('/Ticket/Elements/CheckMandatoryFields', Ticket => $TicketObj);
- return if !@errors;
- my $msg = 'Missing required field'.(@errors > 1 ? 's' : '').': ' .
- join(', ', map { $_->Name } @errors);
- $m->notes( ('InvalidField-' . $_->Id) => 'Required' ) foreach @errors;
- push @$results, $msg;
-}
-</%init>
diff --git a/rt/share/html/Callbacks/CheckMandatoryFields/Ticket/Update.html/BeforeDisplay b/rt/share/html/Callbacks/CheckMandatoryFields/Ticket/Update.html/BeforeDisplay
deleted file mode 100644
index 0d69bc27b..000000000
--- a/rt/share/html/Callbacks/CheckMandatoryFields/Ticket/Update.html/BeforeDisplay
+++ /dev/null
@@ -1,24 +0,0 @@
-<%doc>
-When the user tries to change a ticket's status to "resolved" through
-the Update interface, check mandatory fields. If they aren't all set,
-redirect to Ticket Basics instead of updating. Note that this will
-lose any comments/time/other information the user has entered.
-</%doc>
-
-<%init>
-my $TicketObj = $ARGS{'Ticket'};
-my $ARGSRef = $ARGS{'ARGSRef'};
-my $oldStatus = $TicketObj->Status();
-my $newStatus = $ARGSRef->{'Status'} || $ARGSRef->{'DefaultStatus'};
-if( $oldStatus ne 'resolved' and
- $newStatus eq 'resolved' and
- $m->comp('/Ticket/Elements/CheckMandatoryFields',
- Ticket => $TicketObj
- ) ) {
- $m->clear_buffer;
- RT::Interface::Web::Redirect(
- RT->Config->Get('WebURL')."Ticket/Modify.html?id=".$TicketObj->Id."&resolve=1"
- );
- $m->abort;
-}
-</%init>