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