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[%# INTERFACE:
10  # default: hash. Defaults for category, subcategory, name etc.
11  # button_name: string. What the button will say.
12  # category: hash (keyed by category) of hashes (keyed by subcategory) of
13  #           hashes (keyed by name), with value being the series_id of the
14  #           series. Contains details of all series the user can see.
15  #%]
16
17[% PROCESS "reports/series-common.html.tmpl"
18   newtext = "New (name below)"
19 %]
20
21<table cellpadding="2" cellspacing="2" border="0"
22       style="text-align: left; margin-left: 20px">
23  <tbody>
24    <tr>
25      <th>Category:</th>
26      <th></th>
27      <th>Sub-category:</th>
28      <th>Name:</th>
29      <td></td>
30    </tr>
31    <tr>
32      [% PROCESS series_select sel = { name => 'category',
33                                       size => 5,
34                                       onchange => "catSelected()" } %]
35        <td>
36          <noscript>
37            <input type="submit" name="action-edit" value="Update --&gt;"
38                   id="action-edit">
39          </noscript>
40        </td>
41
42      [% PROCESS series_select sel = { name => 'subcategory',
43                                       size => 5,
44                                       onchange => "checkNewState()" } %]
45
46      <td valign="top" name="name">
47        <input type="text" name="name" maxlength="64"
48               value="[% default.name.0 FILTER html %]" size="25">
49      </td>
50
51      <td valign="top">
52        <span style="font-weight: bold;">Run every</span> &nbsp;
53        <input type="text" size="2" name="frequency"
54               value="[% (default.frequency.0 OR 7) FILTER html %]">
55        <span style="font-weight: bold;">&nbsp;day(s)</span><br>
56        [%# Change 'admin' here and in Series.pm, or remove the check
57            completely, if you want to change who can make series public. %]
58        [% IF user.in_group('admin') %]
59          <input type="checkbox" name="public"
60                 [%+ "checked='checked'" IF default.public.0 %]>
61          <span style="font-weight: bold;">Visible to all<br>
62          (within group restrictions)</span>
63        [% END %]
64      </td>
65    </tr>
66
67    <tr>
68      <td>
69        <input type="text" style="width: 100%" name="newcategory"
70               maxlength="64" value="[% default.newcategory.0 FILTER html %]">
71      </td>
72        <td></td>
73      <td>
74        <input type="text" style="width: 100%" name="newsubcategory"
75               maxlength="64"
76               value="[% default.newsubcategory.0 FILTER html %]">
77      </td>
78      <td></td>
79      <td>
80        <input type="submit" name="submit-button" id="submit-button"
81               value="[% button_name FILTER html %]">
82      </td>
83    </tr>
84  </tbody>
85</table>
86