]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/serial/subscription/issuance.tt2
LP#1361801: Add required fields to serial issuance form
[Evergreen.git] / Open-ILS / src / templates / serial / subscription / issuance.tt2
1 <div dojoType="dijit.layout.ContentPane" layout="top"
2     class="oils-header-panel lesser">
3     <div>[% l('Issuances') %]</div>
4     <div style="margin-right: 16px;">
5         <span dojoType="dijit.form.Button"
6             onclick="iss_grid.refresh();">[% l('Refresh Grid') %]</span>
7         <span dojoType="dijit.form.Button"
8             onclick="iss_grid.showCreatePane();">[% l('New Issuance') %]</span>
9         <span dojoType="dijit.form.Button"
10             onclick="iss_grid.deleteSelected();">[% l('Delete Selected') %]</span>
11     </div>
12 </div>
13 [%- IF CGI.param('context') != 'scv' -%]
14 <div class="serial-additional-controls">
15     <span dojoType="dijit.form.Button"
16         onclick="prediction_dialog.show();">[% l('Generate Predictions') %]</span>
17 </div>
18 [%- END -%]
19 <div dojoType="dijit.layout.ContentPane" layout="top">
20     <table jsId="iss_grid"
21         dojoType="openils.widget.AutoGrid"
22         autoHeight="true"
23         fieldOrder="['subscription','creator','editor','label','date_published','caption_and_pattern','holding_type']"
24         suppressFields="['subscription','holding_link_id','create_date','edit_date','creator','editor']"
25         suppressEditFields="['id','holding_link_id','create_date','edit_date']"
26         defaultCellWidth="'auto'"
27         onPostSubmit="attempt_reload_opac"
28         fmClass="siss"
29         query="{id: '*'}"
30         editOnEnter="true"
31         requiredFields="['date_published','holding_code']"
32         showPaginator="true">
33         <thead>
34             <tr>
35                 <th field="label" formatter="format_siss_label"
36                     get="get_id_and_label"></th>
37             </tr>
38         </thead>
39     </table>
40 </div>
41 <div class="hidden">
42     <div dojoType="dijit.Dialog"
43         title="[% l('Generate Issuance and Item Predictions') %]"
44         execute="generate_predictions(arguments[0]);"
45         jsId="prediction_dialog">
46         <script type="dojo/connect" event="onShow">
47             prepare_prediction_dialog();
48         </script>
49         <table class="serial-dialog-table">
50             <tr>
51                 <th>
52                     <input dojoType="dijit.form.RadioButton"
53                         id="end_date" name="end_how" value="date"
54                         checked="false" disabled="true"
55                         jsId="prediction_dialog_end_date" />
56                     <label for="end_date">
57                         [% l('Predict until end of subscription') %]
58                     </label>
59                 </th>
60                 <td></td>
61             </tr>
62             <tr>
63                 <th>
64                     <input dojoType="dijit.form.RadioButton"
65                         id="end_num" name="end_how" value="number"
66                         checked="true" jsId="prediction_dialog_end_num"
67                         onChange="if (this.attr('checked')) setTimeout(function(){prediction_dialog_num_to_predict.focus();},200);" />
68                     <label for="end_num">
69                         [% l('Predict a certain number of issuances:') %]
70                     </label>
71                 </th>
72                 <td>
73                     <input dojoType="dijit.form.TextBox"
74                         style="width: 5em;"
75                         jsId="prediction_dialog_num_to_predict"
76                         name="num_to_predict" />
77                 </td>
78             </tr>
79             <tr>
80                 <td colspan="2">
81                     <button dojoType="dijit.form.Button"
82                         jsId="prediction_dialog_submit"
83                         type="submit" disabled="true">[% l('Generate') %]</button>
84                 </td>
85             </tr>
86         </table>
87     </div>
88 </div>