[Rt-commit] r19295 - in rtir/2.5/trunk/html: Callbacks/RTIR/Ticket/Elements/EditCustomFields RTIR/Incident
ruz at bestpractical.com
ruz at bestpractical.com
Mon Apr 20 10:51:04 EDT 2009
Author: ruz
Date: Mon Apr 20 10:51:04 2009
New Revision: 19295
Modified:
rtir/2.5/trunk/html/Callbacks/RTIR/Ticket/Elements/EditCustomFields/MassageCustomFields
rtir/2.5/trunk/html/RTIR/Edit.html
rtir/2.5/trunk/html/RTIR/Incident/Edit.html
Log:
* switch to RT's interfaces for editing CFs
Modified: rtir/2.5/trunk/html/Callbacks/RTIR/Ticket/Elements/EditCustomFields/MassageCustomFields
==============================================================================
--- rtir/2.5/trunk/html/Callbacks/RTIR/Ticket/Elements/EditCustomFields/MassageCustomFields (original)
+++ rtir/2.5/trunk/html/Callbacks/RTIR/Ticket/Elements/EditCustomFields/MassageCustomFields Mon Apr 20 10:51:04 2009
@@ -1,8 +1,13 @@
<%args>
$CustomFields => undef
-
+$TicketObj => undef
+$QueueObj => undef
</%args>
<%init>
-# We never want to see the RTIR custom fields in the edity ui
-$CustomFields->Limit( FIELD => 'Name', OPERATOR => 'NOT STARTSWITH', VALUE => '_RTIR');
+my $queue = $QueueObj || $TicketObj->QueueObj;
+if ( RT::IR->OurQueue( $queue ) ) {
+ # We never want to see the RTIR custom fields State and Constituency in the edity ui
+ $CustomFields->Limit( FIELD => 'Name', OPERATOR => '!=', VALUE => 'State');
+ $CustomFields->Limit( FIELD => 'Name', OPERATOR => '!=', VALUE => 'Constituency');
+}
</%init>
Modified: rtir/2.5/trunk/html/RTIR/Edit.html
==============================================================================
--- rtir/2.5/trunk/html/RTIR/Edit.html (original)
+++ rtir/2.5/trunk/html/RTIR/Edit.html Mon Apr 20 10:51:04 2009
@@ -51,9 +51,7 @@
<table>
<tr>
- <td class="label">
- <%loc("State")%>:
- </td>
+ <td class="label"><%loc("State")%>:</td>
<td class="value" colspan="2">
% unless ( $Type eq 'Block' ) {
<& /RTIR/Elements/ShowRTIRField, Ticket => $Ticket, Name => 'State' &>
@@ -67,20 +65,15 @@
<td class="value"><input name="Subject" value="<%$Ticket->Subject|h%>" size="50" /></td>
</tr>
<tr>
- <td class="label">
- <&|/l&>Owner</&>:
- </td>
- <td>
- <& /Elements/SelectOwner, Name => 'Owner', QueueObj => $Ticket->QueueObj, TicketObj => $Ticket, Default => $Ticket->Owner &>
- </td>
+ <td class="label"><&|/l&>Owner</&>:</td>
+ <td><& /Elements/SelectOwner,
+ Name => 'Owner', Default => $Ticket->Owner,
+ TicketObj => $Ticket, QueueObj => $Ticket->QueueObj,
+ &></td>
</tr>
<tr>
- <td class="label">
- <%loc("Incident")%>:
- </td>
- <td class="value">
- <& /RTIR/Elements/ShowIncidents, Ticket => $Ticket &>
- </td>
+ <td class="label"><%loc("Incident")%>:</td>
+ <td class="value"><& /RTIR/Elements/ShowIncidents, Ticket => $Ticket &></td>
</tr>
<tr>
<td class="label"><&|/l&>Time Worked</&>:</td>
@@ -97,101 +90,6 @@
</tr>
% }
-% if ($Type eq 'Report') {
- <tr>
- <td class="labeltop"><&|/l&>SLA</&>:</td>
- <td class="value">
- <& /RTIR/Elements/EditRTIRField,
- TicketObj => $Ticket,
- Name => 'SLA' &>
- </td>
- </tr>
- <tr>
- <td class="labeltop"><&|/l&>Customer</&>:</td>
- <td class="value">
- <& /RTIR/Elements/EditRTIRField,
- TicketObj => $Ticket,
- Name => 'Customer' &>
- </td>
- </tr>
- <tr>
- <td class="labeltop">
- <%loc("How Reported")%>:
- </td>
- <td class="value" colspan="2">
- <table>
- <tr>
- <td>
- <& /RTIR/Elements/EditRTIRField,
- TicketObj => $Ticket,
- Name => 'HowReported' &>
- </td>
- <td class="labeltop">
- <%loc("Reporter Type")%>:
- </td>
- <td class="value" colspan="2">
- <& /RTIR/Elements/EditRTIRField,
- TicketObj => $Ticket,
- Name => 'ReporterType' &>
- </td>
- </tr>
- </table>
- </td>
- </tr>
-% } elsif ($Type eq 'Block') {
- <tr>
- <td class="label"><&|/l&>IP Address</&>:</td>
- <td class="value">
- <& /RTIR/Elements/EditRTIRField,
- TicketObj => $Ticket,
- Name => 'IP' &>
- </td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Netmask</&>:</td>
- <td class="value">
- <& /RTIR/Elements/EditRTIRField,
- TicketObj => $Ticket,
- Name => 'Netmask' &>
- </td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Port</&>:</td>
- <td class="value">
- <& /RTIR/Elements/EditRTIRField,
- TicketObj => $Ticket,
- Name => 'Port' &>
- </td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Where Blocked</&>:</td>
- <td class="value">
- <& /RTIR/Elements/EditRTIRField,
- TicketObj => $Ticket,
- Name => 'WhereBlocked' &>
- </td>
- </tr>
-% } elsif ($Type eq 'Investigation') {
- <tr>
- <td class="labeltop"><&|/l&>Customer</&>:</td>
- <td class="value">
- <& /RTIR/Elements/EditRTIRField,
- TicketObj => $Ticket,
- Name => 'Customer' &>
- </td>
- </tr>
-% }
-% unless ($Type eq 'Block') {
- <tr>
- <td class="labeltop"><&|/l&>IP</&>:</td>
- <td class="value">
- <& /RTIR/Elements/EditRTIRField,
- TicketObj => $Ticket,
- Name => 'IP', Cols => 40 &>
- </td>
- </tr>
-% }
-
<tr>
<td colspan="2">
<& /Ticket/Elements/EditCustomFields, TicketObj => $Ticket &>
Modified: rtir/2.5/trunk/html/RTIR/Incident/Edit.html
==============================================================================
--- rtir/2.5/trunk/html/RTIR/Incident/Edit.html (original)
+++ rtir/2.5/trunk/html/RTIR/Incident/Edit.html Mon Apr 20 10:51:04 2009
@@ -48,19 +48,11 @@
<table>
<tr>
- <td class="label">
- <&|/l&>State</&>:
- </td>
- <td class="value">
- <& /RTIR/Elements/ShowRTIRField,
- Name => 'State',
- Ticket => $Ticket &>
- </td>
+ <td class="label"><&|/l&>State</&>:</td>
+ <td class="value"><& /RTIR/Elements/ShowRTIRField, Name => 'State', Ticket => $Ticket &></td>
</tr>
<tr>
- <td class="label">
- <&|/l&>Owner</&>:
- </td>
+ <td class="label"><&|/l&>Owner</&>:</td>
<td class="value">
<& /Elements/SelectOwner, Name => 'Owner', QueueObj => $Ticket->QueueObj, TicketObj => $Ticket, Default => $Ticket->Owner &>
</td>
@@ -70,15 +62,6 @@
<td class="value"><input name="Subject" value="<%$Ticket->Subject|h%>" size="50" /></td>
</tr>
<tr>
- <td class="label"><&|/l&>Description</&>:</td>
- <td class="value">
- <& /RTIR/Elements/EditRTIRField,
- TicketObj => $Ticket,
- Name => 'Description',
- Cols => 60 &>
- </td>
- </tr>
- <tr>
<td class="label"><&|/l&>Priority</&>:</td>
<td class="value"><input name="Priority" value="<%$Ticket->Priority|h%>" size="5" /></td>
</tr>
@@ -97,42 +80,6 @@
</td>
</tr>
% }
- <tr>
- <td class="label"><&|/l&>Function</&>:</td>
- <td class="value">
- <& /RTIR/Elements/EditRTIRField,
- TicketObj => $Ticket,
- Name => 'Function',
- Rows => 1 &>
- </td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Classification</&>:</td>
- <td class="value">
- <& /RTIR/Elements/EditRTIRField,
- TicketObj => $Ticket,
- Name => 'Classification',
- Rows => 1 &>
- </td>
- </tr>
- <tr>
- <td class="label"><&|/l&>IP</&>:</td>
- <td class="value">
- <& /RTIR/Elements/EditRTIRField,
- TicketObj => $Ticket,
- Name => 'IP',
- Cols => 40 &>
- </td>
- </tr>
- <tr>
- <td class="label"><&|/l&>Resolution</&>:</td>
- <td class="value">
- <& /RTIR/Elements/EditRTIRField,
- TicketObj => $Ticket,
- Name => 'Resolution',
- Rows => 1 &>
- </td>
- </tr>
<tr>
<td colspan="2">
@@ -157,7 +104,9 @@
</table>
<br />
-<& /Elements/Submit, Name => 'SaveChanges', Label => loc('Save Changes'), Caption => loc("If you've updated anything above, be sure to"), color => "#333399" &>
+<& /Elements/Submit, Name => 'SaveChanges', Label => loc('Save Changes'),
+ Caption => loc("If you've updated anything above, be sure to"), color => "#333399",
+&>
</form>
<%INIT>
More information about the Rt-commit
mailing list