2 <div dojoType="dijit.layout.ContentPane" layoutAlign='top'>
3 <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
6 <button dojoType='dijit.form.Button' onclick='svNewSurvey();'>Add New Survey</button>
7 <button dojoType='dijit.form.Button' onclick='deleteFromGrid();'>Delete Selected</button>
8 <button dojoType='dijit.form.Button' onclick='endSurvey();'>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">Survey ID</th>
18 <th field="name" formatter='formatName' width='auto'>Name</th>
19 <th field="description" width='auto'>Description</th>
20 <th field="owner" get='getOrgInfo'>Owning Library</th>
21 <th field="start_date" width='auto' get='getDateTimeField'>Survey Start Date</th>
22 <th field="end_date" width='auto' get='getDateTimeField'>End Date</th>
23 <th field="opac" formatter='formatBool'>OPAC Survey?</th>
24 <th field="poll" formatter='formatBool' >Poll Style?</th>
25 <th field="required" formatter='formatBool'>Is Required?</th>
26 <th field="usr_summary" formatter='formatBool'>Display in User Summary?</th>
32 <div style='display:none;' dojoType="dijit.Dialog" jsId='svSurveyDialog' title='New Survey' execute='svCreate(arguments[0]);'>
34 <table id='surveyDialog'>
37 <td><input dojoType='dijit.form.TextBox' name='svName'/></td>
41 <td><input dojoType='dijit.form.TextBox' name='svDescription'></td>
44 <td>Owning Library</td>
45 <td><select dojoType='openils.widget.OrgUnitFilteringSelect' name='svOwner' jsId='asvOwningOrg' searchAttr='shortname' labelAttr='shortname'/></td>
49 <td><input dojoType='dijit.form.TextBox' name='svStart_date'></td>
53 <td><input dojoType='dijit.form.TextBox' name='svEnd_date'></td>
57 <td><input dojoType='dijit.form.CheckBox' name='svOpac'></td>
61 <td><input dojoType='dijit.form.CheckBox' name='svPoll'></td>
65 <td><input dojoType='dijit.form.CheckBox' name='svRequired'></td>
68 <td>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'>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>';