83dcfdd08d634f67f46b2dc10502fceb1f08daf5
[working/Evergreen.git] / Open-ILS / web / templates / default / conify / global / config / standing_penalty.tt2
1 [% WRAPPER default/base.tt2 %]
2 <script src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/standing_penalty.js'> </script>
3 <style>
4     @import "[% ctx.media_prefix %]/js/dojo/dojox/form/resources/CheckedMultiSelect.css";
5 </style>
6 <h1>Standing Penalty Types</h1><br/>
7
8 <script>
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             </div>
46         </div>
47
48         <table  jsId="spGrid"
49                 dojoType="openils.widget.AutoGrid"
50                 fieldOrder="['id', 'name', 'label', 'block_list']"
51                 query="{name: '*'}"
52                 defaultCellWidth='15'
53                 fmClass='csp'
54                 editOnEnter='true'>
55             <thead>
56                 <tr>
57                     <th field="id" formatter='formatId'/>
58                 </tr>
59
60             </thead>
61         </table>
62     </div>
63 </div>
64 [% END %]
65
66