</link> is not valid HTML
[working/Evergreen.git] / Open-ILS / web / templates / default / conify / global / config / standing_penalty.tt2
1 [% WRAPPER default/base.tt2 %]
2 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/standing_penalty.js'></script>
3 <style type="text/css">
4     @import "[% ctx.media_prefix %]/js/dojo/dojox/form/resources/CheckedMultiSelect.css";
5 </style>
6 <h1>Standing Penalty Types</h1><br/>
7
8 <script type="text/javascript">
9
10     if(!dojo._hasResource['openils.widget.StandingPenaltyBlockedSelector']) {
11         dojo.provide('openils.widget.StandingPenaltyBlockedSelector');
12         dojo.require('dojox.form.CheckedMultiSelect');
13         dojo.require('dojo.data.ItemFileReadStore');
14         dojo.declare(
15             'openils.widget.StandingPenaltyBlockedSelector',
16             [dojox.form.CheckedMultiSelect],
17             {
18                 postCreate : function() {
19                     this._multiValue = true;
20                     this.addOption({value:'CIRC', label:'CIRC'});
21                     this.addOption({value:'RENEW', label:'RENEW'});
22                     this.addOption({value:'HOLD', label:'HOLD'});
23                 },
24                 attr : function(name, value) {
25                     if(name == 'value' && value == null) {
26                         var val = this.inherited('attr', arguments);
27                         var str = '';
28                         for(var i in val)
29                             str += val[i] + '|';
30                         return str.substring(0, str.length - 1);
31                     } else {
32                         return this.inherited('attr', arguments);
33                     }
34                 }
35             }
36         );
37     }
38
39 </script>
40   <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
41         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
42             <div>Standing Penalty Types</div>
43             <div>
44                 <button dojoType='dijit.form.Button' onClick='spGrid.showCreateDialog()'>New Penalty Type</button>
45                 <button dojoType='dijit.form.Button' onClick='spGrid.deleteSelected()'>Delete Selected</button>
46             </div>
47         </div>
48
49         <table  jsId="spGrid"
50                 dojoType="openils.widget.AutoGrid"
51                 fieldOrder="['id', 'name', 'label', 'block_list']"
52                 query="{name: '*'}"
53                 defaultCellWidth='"auto"'
54                 fmClass='csp'
55                 editOnEnter='true'>
56             <thead>
57                 <tr> <th field="id" formatter='formatId'/> </tr>
58             </thead>
59         </table>
60     </div>
61 </div>
62 [% END %]
63
64