[Rt-commit] r6010 - in rtir/branches/2.1-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Wed Sep 20 22:38:39 EDT 2006
Author: ruz
Date: Wed Sep 20 22:38:36 2006
New Revision: 6010
Modified:
rtir/branches/2.1-EXPERIMENTAL/ (props changed)
rtir/branches/2.1-EXPERIMENTAL/html/RTIR/Elements/AddWatchers
Log:
r1603 at cubic-pc: cubic | 2006-09-21 03:52:25 +0400
* drop $msg as it's not used
Modified: rtir/branches/2.1-EXPERIMENTAL/html/RTIR/Elements/AddWatchers
==============================================================================
--- rtir/branches/2.1-EXPERIMENTAL/html/RTIR/Elements/AddWatchers (original)
+++ rtir/branches/2.1-EXPERIMENTAL/html/RTIR/Elements/AddWatchers Wed Sep 20 22:38:36 2006
@@ -23,66 +23,52 @@
%#
%# END LICENSE BLOCK
<br />
-<%$msg%><br />
<&|/l&>Add new Correspondents</&>:<br />
<table>
-% if ($Users) {
-<tr><td>
-<&|/l&>Type</&>
-</td><td>
-<&|/l&>Username</&>
-</td></tr>
-% while (my $u = $Users->Next ) {
-<tr><td><&/Elements/SelectWatcherType, Name => "Ticket-AddWatcher-Principal-".$u->PrincipalId &></td><td><%$u->Name%> (<%$u->RealName%>)</td></tr>
+% if ( $Users ) {
+<tr><td><&|/l&>Type</&></td><td><&|/l&>Username</&></td></tr>
+% while ( my $u = $Users->Next ) {
+<tr><td><& /Elements/SelectWatcherType, Name => "Ticket-AddWatcher-Principal-". $u->PrincipalId &></td>
+<td><% $u->Name %> (<% $u->RealName %>)</td></tr>
% }
% }
-% if ($Groups->Count) {
-<tr><td>
-<&|/l&>Type</&>
-</td><td>
-<&|/l&>Group</&>
-</td></tr>
-% while (my $g = $Groups->Next ) {
-<tr><td><&/Elements/SelectWatcherType, Name => "Ticket-AddWatcher-Principal-".$g->PrincipalId, Scope => 'queue' &></td><td><%$g->Name%> (<%$g->Description%>)</td></tr>
+% if ( $Groups->Count ) {
+<tr><td><&|/l&>Type</&></td><td><&|/l&>Group</&></td></tr>
+% while ( my $g = $Groups->Next ) {
+<tr><td><& /Elements/SelectWatcherType, Name => "Ticket-AddWatcher-Principal-". $g->PrincipalId, Scope => 'queue' &></td>
+<td><% $g->Name %> (<% $g->Description %>)</td></tr>
% }
% }
-<tr><td>
-<&|/l&>Type</&>
-</td><td>
-<&|/l&>Email</&>
-</td></tr>
-<tr><td>
-<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail1" &>
-</td><td>
-<input name="WatcherAddressEmail1" size="15" />
-</td></tr>
-<tr><td>
-<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail2" &>
-</td><td>
-<input name="WatcherAddressEmail2" size="15" />
-</td></tr>
-<tr><td>
-<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail3" &>
-</td><td>
-<input name="WatcherAddressEmail3" size="15" />
-</td></tr>
+<tr><td><&|/l&>Type</&></td><td><&|/l&>Email</&></td></tr>
+
+<tr><td><& /Elements/SelectWatcherType, Name => "WatcherTypeEmail1" &></td>
+<td><input name="WatcherAddressEmail1" size="15" /></td></tr>
+
+<tr><td><& /Elements/SelectWatcherType, Name => "WatcherTypeEmail2" &></td>
+<td><input name="WatcherAddressEmail2" size="15" /></td></tr>
+
+<tr><td><& /Elements/SelectWatcherType, Name => "WatcherTypeEmail3" &></td>
+<td><input name="WatcherAddressEmail3" size="15" /></td></tr>
+
</table>
<%INIT>
-my ($msg, $Users, $Groups);
-if ($UserString) {
- $Users = RT::Users->new($session{'CurrentUser'});
- $Users->Limit(FIELD => $UserField,
- VALUE => $UserString,
- OPERATOR => $UserOp);
- }
+my ($Users, $Groups);
+if ( $UserString ) {
+ $Users = RT::Users->new( $session{'CurrentUser'} );
+ $Users->Limit(
+ FIELD => $UserField,
+ VALUE => $UserString,
+ OPERATOR => $UserOp,
+ );
+}
-$Groups = new RT::Groups($session{'CurrentUser'});
-$Groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'UserDefined');
+$Groups = new RT::Groups( $session{'CurrentUser'} );
+$Groups->LimitToUserDefinedGroups;
</%INIT>
More information about the Rt-commit
mailing list