2 <tr><td></td><td><table>
3 % my $prefix = $Name.'Rules-';
4 % foreach my $o (@options) {
5 <tr><td align="right"><% $o->{'label'} %>:</td>
7 % if ( $o->{'type'} eq 'text' ) {
8 <input type="text" name="<% $prefix.$o->{'name'} %>" value="<% $rules{$o->{'name'}} %>">
10 % elsif ( $o->{'type'} eq 'select' and ref $o->{'options'} ) {
11 <select name="<% $prefix.$o->{'name'} %>">
12 % my @choices = @{ $o->{'options'} };
14 % my $v = shift @choices;
15 % my $l = shift @choices;
16 <option value="<% $v %>"<% ($rules{$o->{'name'}} eq $v) ? ' SELECTED' : ''%>>
20 % } # else $o->{'type'}
26 my (@options, %rules);
28 my $ScripXObj = "RT::Scrip$Name"->new($session{'CurrentUser'});
29 $ScripXObj->Load($ScripX);
30 my $QueueObj = RT::Queue->new($session{'CurrentUser'});
31 $QueueObj->Load($Queue);
32 my $method = "Load$Name";
33 my $XObj = $ScripXObj->$method();
34 @options = $XObj->Options('QueueObj' => $QueueObj);
35 %rules = split("\n", $Default);