2 <div dojoType="dijit.layout.ContentPane" layoutAlign='top'>
3 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
4 <div>[% l('Survey List') %]</div>
6 <button dojoType='dijit.form.Button' onclick='svNewSurvey();'>[% l('Add New Survey') %]</button>
7 <button dojoType='dijit.form.Button' onclick='deleteFromGrid();'>[% l('Delete Selected') %]</button>
8 <button dojoType='dijit.form.Button' onclick='endSurvey();'>[% l('End Selected Surveys') %]</button>
13 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:400px'>
14 <table jsId="svGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}">
17 <th field="id">[% l('Survey ID') %]</th>
18 <th field="name" formatter='formatName' width='auto'>[% l('Name') %]</th>
19 <th field="description" width='auto'>[% l('Description') %]</th>
20 <th field="owner" get='getOrgInfo'>[% l('Owning Library') %]</th>
21 <th field="start_date" width='auto' get='getDateTimeField'>[% l('Survey Start Date') %]</th>
22 <th field="end_date" width='auto' get='getDateTimeField'>[% l('End Date') %]</th>
23 <th field="opac" formatter='formatBool'>[% l('OPAC Survey?') %]</th>
24 <th field="poll" formatter='formatBool' >[% l('Poll Style?') %]</th>
25 <th field="required" formatter='formatBool'>[% l('Is Required?') %]</th>
26 <th field="usr_summary" formatter='formatBool'>[% l('Display in User Summary?') %]</th>
32 <div style='display:none;' dojoType="dijit.Dialog" jsId='svSurveyDialog' title='[% l('New Survey') %]' execute='svCreate(arguments[0]);'>
34 <table id='surveyDialog'>
36 <td>[% l('Name') %]</td>
37 <td><input dojoType='dijit.form.TextBox' name='svName'/></td>
40 <td>[% l('Description') %]</td>
41 <td><input dojoType='dijit.form.TextBox' name='svDescription'></td>
44 <td>[% l('Owning Library') %]</td>
45 <td><select dojoType='openils.widget.OrgUnitFilteringSelect' name='svOwner' jsId='asvOwningOrg' searchAttr='shortname' labelAttr='shortname'></select></td>
48 <td>[% l('Start Date') %]</td>
49 <td><input dojoType='dijit.form.TextBox' name='svStart_date'></td>
52 <td>[% l('End Date') %]</td>
53 <td><input dojoType='dijit.form.TextBox' name='svEnd_date'></td>
56 <td>[% l('OPAC Survey?') %]</td>
57 <td><input dojoType='dijit.form.CheckBox' name='svOpac'></td>
60 <td>[% l('Poll Style?') %]</td>
61 <td><input dojoType='dijit.form.CheckBox' name='svPoll'></td>
64 <td>[% l('Is Required?') %]</td>
65 <td><input dojoType='dijit.form.CheckBox' name='svRequired'></td>
68 <td>[% l('Display in User Summary?') %]</td>
69 <td><input dojoType='dijit.form.CheckBox' name='svUsr_summary'></td>
72 <td colspan='2' align='center'>
73 <button jsId='createSave' dojoType='dijit.form.Button' type='submit'>[% l('Save Changes') %]</button>
82 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/action/survey.js'></script>
83 <script type="text/javascript">
84 function formatName(inDatum) {
85 for(var i in svCache){
88 if (inDatum == sv.name()){
89 return '<a href="[% ctx.base_path %]/conify/global/action/survey/edit/'+id+'">'+inDatum+'</a>';