1[%# This Source Code Form is subject to the terms of the Mozilla Public
2  # License, v. 2.0. If a copy of the MPL was not distributed with this
3  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4  #
5  # This Source Code Form is "Incompatible With Secondary Licenses", as
6  # defined by the Mozilla Public License, v. 2.0.
7  #%]
8
9[% sortlist_separator = '---' %]
10
11<dl>
12  [% FOREACH param = panel.param_list %]
13    <dt id="[% param.name FILTER html %]_desc">[% param.name FILTER html %]</dt>
14    <dd>[% panel.param_descs.${param.name} FILTER none %]
15      <p>
16      [% IF param.type == "t" %]
17        <input type="text" size="80" name="[% param.name FILTER html %]"
18               id="[% param.name FILTER html %]" value="[% Param(param.name) FILTER html %]">
19      [% ELSIF param.type == "p" %]
20        <input type="password" size="80" name="[% param.name FILTER html %]"
21               id="[% param.name FILTER html %]" value="[% Param(param.name) FILTER html %]"
22               autocomplete="off">
23      [% ELSIF param.type == "l" %]
24        <textarea name="[% param.name FILTER html %]" id="[% param.name FILTER html %]"
25                  rows="10" cols="80">[% Param(param.name) FILTER html %]</textarea>
26      [% ELSIF param.type == "b" %]
27        <input type="radio" name="[% param.name FILTER html %]" id="[% param.name FILTER html %]-on"
28               value=1 [% "checked=\"checked\"" IF Param(param.name) %]>
29        <label for="[% param.name FILTER html %]-on">有効 (On)</label>
30        <input type="radio" name="[% param.name FILTER html %]" id="[% param.name FILTER html %]-off"
31               value=0 [% "checked=\"checked\"" IF !Param(param.name) %]>
32        <label for="[% param.name FILTER html %]-off">無効 (Off)</label>
33      [% ELSIF param.type == "m" %]
34        [% boxSize = 5 %]
35        [% boxSize = param.choices.size IF param.choices.size < 5 %]
36
37        <select multiple="multiple" size="[% boxSize FILTER html %]"
38                name="[% param.name FILTER html %]" id="[% param.name FILTER html %]">
39          [% FOREACH item = param.choices %]
40            <option value="[% item FILTER html %]"
41                    [% " selected=\"selected\"" IF lsearch(Param(param.name), item) != -1 %]>
42              [% item FILTER html %]
43            </option>
44          [% END %]
45        </select>
46      [% ELSIF param.type == "o" %]
47        <input id="input_[% param.name FILTER html %]" size="80"
48               name="[% param.name FILTER html %]"
49               value="[% Param(param.name) FILTER html %]"><br>
50        [% boxSize = 7 %]
51        [% boxSize = 3 + param.choices.size IF param.choices.size < 7 %]
52        [% plist = Param(param.name).split(',') %]
53
54        <table id="table_[% param.name FILTER html %]" class="bz_default_hidden">
55          <tr>
56            <td rowspan="2">
57              <select id="select_[% param.name FILTER html %]"
58                      name="select_[% param.name FILTER html %]"
59                      size="[% boxSize FILTER html %]">
60                [% FOREACH item = plist %]
61                  <option value="[% item FILTER html %]">[% item FILTER html %]</option>
62                [% END %]
63                <option class="sortlist_separator" disabled="disabled"
64                        value="[% sortlist_separator %]">有効&uarr;&nbsp;&darr;無効</option>
65                [% FOREACH item = param.choices %]
66                  [% IF lsearch(plist, item) == -1 %]
67                    <option value="[% item FILTER html %]">[% item FILTER html %]</option>
68                  [% END %]
69                [% END %]
70              </select>
71            </td>
72            <td style="vertical-align: bottom">
73              <button type="button"
74                      onClick="sortedList_moveItem('[% param.name FILTER html %]', -1, '[% sortlist_separator %]');">&uarr;</button>
75            </td>
76          </tr>
77
78          <tr>
79            <td style="vertical-align: top">
80              <button type="button"
81                      onClick="sortedList_moveItem('[% param.name FILTER html %]', +1, '[% sortlist_separator %]');">&darr;</button>
82            </td>
83          </tr>
84        </table>
85
86        <script type="text/javascript">
87            bz_toggleClass("input_[% param.name FILTER html %]", "bz_default_hidden");
88            bz_toggleClass("table_[% param.name FILTER html %]", "bz_default_hidden");
89        </script>
90      [% ELSIF param.type == "s" %]
91        <select name="[% param.name FILTER html %]" id="[% param.name FILTER html %]">
92          [% FOREACH item = param.choices %]
93            <option value="[% item FILTER html %]"
94                    [% " selected=\"selected\"" IF item == Param(param.name) %]>
95              [% IF param.name == "defaultseverity" %]
96                [% display_value("bug_severity", item) FILTER html %]
97              [% ELSIF param.name == "defaultplatform" %]
98                [% display_value("rep_platform", item) FILTER html %]
99              [% ELSIF param.name == "defaultopsys" %]
100                [% display_value("op_sys", item) FILTER html %]
101              [% ELSIF param.name == "duplicate_or_move_bug_status" %]
102                [% display_value("bug_status", item) FILTER html %]
103              [% ELSE %]
104                [% item FILTER html %]
105              [% END %]
106            </option>
107          [% END %]
108        </select>
109      [% ELSE %]
110        <font color="red">
111          未知のパラメータ型 [% param.type FILTER html %] です!!!
112        </font>
113      [% END %]
114      </p>
115      [% UNLESS param.no_reset %]
116        <p>
117          <input type="checkbox" name="reset-[% param.name FILTER html %]"
118                 id="reset-[% param.name FILTER html %]">
119          <label for="reset-[% param.name FILTER html %]">Reset</label>
120        </p>
121      [% END %]
122      <hr>
123    </dd>
124  [% END %]
125</dl>
126