1 [% WRAPPER default/base.tt2 %]
2 <script src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/standing_penalty.js'> </script>
4 @import "[% ctx.media_prefix %]/js/dojo/dojox/form/resources/CheckedMultiSelect.css";
6 <h1>Standing Penalty Types</h1><br/>
9 if(!dojo._hasResource['openils.widget.StandingPenaltyBlockedSelector']) {
10 dojo.provide('openils.widget.StandingPenaltyBlockedSelector');
11 dojo.require('dojox.form.CheckedMultiSelect');
12 dojo.require('dojo.data.ItemFileReadStore');
14 'openils.widget.StandingPenaltyBlockedSelector',
15 [dojox.form.CheckedMultiSelect],
17 postCreate : function() {
18 this._multiValue = true;
19 this.addOption({value:'CIRC', label:'CIRC'});
20 this.addOption({value:'RENEW', label:'RENEW'});
21 this.addOption({value:'HOLD', label:'HOLD'});
23 attr : function(name, value) {
24 if(name == 'value' && value == null) {
25 var val = this.inherited('attr', arguments);
29 return str.substring(0, str.length - 1);
31 return this.inherited('attr', arguments);
39 <div dojoType="dijit.form.DropDownButton">
40 <span>New Standing Penalty</span>
41 <div dojoType="dijit.TooltipDialog" execute="spCreate(arguments[0]);">
42 <table class='dijitTooltipTable'>
44 <td><label for="name">Code: </label></td>
45 <td><input dojoType="dijit.form.TextBox" name="name"/></td>
48 <td><label for="label">Label: </label></td>
49 <td><input dojoType="dijit.form.TextBox" name="label"/></td>
52 <td><label for="block_list">Blocked Actions: </label></td>
54 <select style='overflow-y:auto;' multiple='true' dojoType="openils.widget.StandingPenaltyBlockedSelector" name="block_list">
58 <td colspan='2' align='center'>
59 <button dojoType='dijit.form.Button' type="submit">Create</button>
66 <button dojoType='dijit.form.Button' onClick="deleteFromGrid();">Delete Selected</button>
67 <button dojoType='dijit.form.Button' onclick='saveChanges();' disabled='disabled' jsId='spSaveButton'>Save Changes</button>
68 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
69 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
70 <table jsId="spGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
73 <th field="id" width='auto' formatter='formatId'>ID</th>
74 <th field="name" width='auto' editable='true'
75 cellType='dojox.grid.cells._Widget' widgetClass='dijit.form.TextBox'>Name</th>
76 <th field="label" width='auto' editable='true'
77 cellType='dojox.grid.cells._Widget' widgetClass='dijit.form.TextBox'>Label</th>
78 <th field="block_list" width='auto' editable='true'
79 cellType='dojox.grid.cells._Widget'
80 widgetClass='openils.widget.StandingPenaltyBlockedSelector'>Block List</th>