Made jquery variables application globals
[eq/.git] / templates / default / ht_sandbox.tpl
1 <center>
2
3 <script type="text/javascript" src="{jquery_url}"></script>
4 <script type="text/javascript">                                         
5
6  function updateSelections()
7  {
8    //alert($('#companionship :selected').attr('id')+' - '+$('#companionship :selected').val()+' - '+$('#companionship :selected').text());
9    switch ($('#companionship :selected').val()) {
10     case '0':
11           $("#district option:selected").removeAttr("selected");
12           $("#assignedHT option:selected").removeAttr("selected");
13           $("#assignedFamilies option:selected").removeAttr("selected");
14     break;
15 <!-- BEGIN switch_case_list -->
16          {switch_case_list}
17 <!-- END switch_case_list -->
18    }
19  };
20
21 </script>     
22
23         <form action="{submit_action}" method="POST">
24         <table border="0" width="100%" cellspacing="2" cellpadding="2">
25                 <tr>
26                         <td align="center" bgcolor="#c9c9c9"><font face="{font}"><b>{title}</b></font></td>
27                 </tr>
28         </table>
29         <br>
30
31         <table border="0" cellspacing="2" cellpadding="2">
32                 <tr>
33                         <th bgcolor="#c9c9c9">Companionship</th>
34                         <th bgcolor="#c9c9c9">Unassigned HT</th>
35                         <th bgcolor="#c9c9c9">Assigned HT</th>
36                         <th bgcolor="#c9c9c9">Unassigned Families</th>
37                         <th bgcolor="#c9c9c9">Assigned Families</th>
38                         <th bgcolor="#c9c9c9">Actions</th>
39                 </tr>
40                 <tr>
41                         <td align="center">
42                                 Companionship
43                                 <br>
44                                 <select id="companionship" name="companionship" onchange="javascript:updateSelections();">
45 <!-- BEGIN comp_list -->
46                                         {companionship_list}
47 <!-- END comp_list -->
48                                 </select>
49                                 <br><br>
50                                 District
51                                 <br>
52                                 <select id="district" name="district">
53 <!-- BEGIN district_list -->
54                                         {district}
55 <!-- END district_list -->
56                                 </select>
57                         </td>
58                         <td>
59                                 <select id="unassignedHT" name="unassignedHT[]" multiple size="9">
60 <!-- BEGIN unassigned_ht_list -->
61                                         {unassigned_ht}
62 <!-- END unassigned_ht_list -->
63                                 </select>
64                         </td>
65                         <td>
66                                 <select id="assignedHT" name="assignedHT[]" multiple size="9">
67 <!-- BEGIN assigned_ht_list -->
68                                         {assigned_ht}
69 <!-- END assigned_ht_list -->
70                                 </select>
71                         </td>
72                         <td>
73                                 <select id="unassignedFamilies" name="unassignedFamilies[]" multiple size="9">
74 <!-- BEGIN unassigned_family_list -->
75                                         {unassigned_family}
76 <!-- END unassigned_family_list -->
77                                 </select>
78                         </td>
79                         <td>
80                                 <select id="assignedFamilies" name="assignedFamiles[]" multiple size="9">
81 <!-- BEGIN assigned_family_list -->
82                                         {assigned_family}
83 <!-- END assigned_family_list -->
84                                 </select>
85                         </td>
86                         <td>
87                                 <table>
88                                         <tr>
89                                                 <td>
90                                                         <font face="{font}"><input style="width: 150px" type="reset" name="clear" value="Clear Selections"></font>
91                                                 </td>
92                                         </tr>
93                                         <tr>
94                                                 <td>
95                                                         <font face="{font}"><input style="width: 150px" type="submit" name="add" value="Add Companionship"></font>
96                                                 </td>
97                                         </tr>
98                                         <tr>
99                                                 <td>
100                                                         <font face="{font}"><input style="width: 150px" type="submit" name="delete" value="Delete Companionship"></font>
101                                                 </td>
102                                         </tr>
103                                         <tr> 
104                                                 <td>
105                                                         <font face="{font}"><input style="width: 150px" type="submit" name="update" value="Update Companionship"></font>
106                                                 </td>
107                                         </tr>
108                                         <tr>
109                                                 <td>
110                                                         <font face="{font}"><input style="width: 150px" type="submit" name="reset" value="Reset to MLS"></font>
111                                                 </td>
112                                         </tr>
113                                 </table>
114                         </td>
115                 </tr>
116         </table>
117         </form>
118
119         <font face="{font}" color=red><b>{debug_list}</b></font>
120
121         <br>
122         {district_table}
123         <br><br>
124 </center>