summary refs log tree commit diff stats
path: root/theme/admin
diff options
context:
space:
mode:
Diffstat (limited to 'theme/admin')
-rwxr-xr-xtheme/admin/polls.tpl94
-rwxr-xr-xtheme/admin/writePoll.tpl76
2 files changed, 0 insertions, 170 deletions
diff --git a/theme/admin/polls.tpl b/theme/admin/polls.tpl deleted file mode 100755 index 81613a9..0000000 --- a/theme/admin/polls.tpl +++ /dev/null
@@ -1,94 +0,0 @@
1<h2>Manage Polls</h2>
2
3<div class="clear"></div>
4
5<script type="text/javascript">
6function deletePoll(id)
7{
8 if (confirm("Are you sure you would like to delete this poll?"))
9 {
10 postwith("/admin/polls.php?pageID=<!--PAGEID-->&action=delete",{id:id});
11 }
12}
13
14// following function taken from http://mentaljetsam.wordpress.com/2008/06/02/using-javascript-to-post-data-between-pages/
15function postwith (to,p) {
16 var myForm = document.createElement("form");
17 myForm.method="post" ;
18 myForm.action = to ;
19 for (var k in p) {
20 var myInput = document.createElement("input") ;
21 myInput.setAttribute("name", k) ;
22 myInput.setAttribute("value", p[k]);
23 myForm.appendChild(myInput) ;
24 }
25 document.body.appendChild(myForm) ;
26 myForm.submit() ;
27 document.body.removeChild(myForm) ;
28}
29
30function bulkAction()
31{
32 var bulk=new Array();
33 $(".the-check:checked").each(function() {
34 bulk.push($(this).val());
35 });
36 var ids = bulk.join(",")
37
38 if (ids != "")
39 {
40 if ($('#manage-bulk select').val() == "delete")
41 {
42 if (confirm("Are you sure you would like to delete the selected polls?"))
43 {
44 postwith("/admin/polls.php?pageID=<!--PAGEID-->&action=deletes",{ids:ids});
45 }
46 }
47 }
48}
49
50$(document).ready(function() {
51 $("input#all-check").click(function() {
52 var what = this.checked;
53 $("input.the-check").each(function() {
54 this.checked = what;
55 });
56 });
57});
58</script>
59
60<!--BEGIN AVAIL-->
61<div id="manage-options">
62 <div id="manage-bulk">
63 <select name="bulk-type">
64 <option value="delete">Delete</option>
65 </select>
66
67 <button id="bulk" type="button" onclick="bulkAction()">Bulk</button>
68 </div>
69</div>
70
71<div class="manage-pagination"><!--PAGINATION--></div>
72
73<table>
74 <tr class="table-header">
75 <td class="table-checkbox"><input type="checkbox" id="all-check" /></td>
76 <td>Question</td>
77 <td colspan="3">Actions</td>
78 </tr>
79 <!--BEGIN POST-->
80 <tr<!--POST.ODD-->>
81 <td class="table-checkbox"><input class="the-check" type="checkbox" name="bulk" value="<!--POST.ID-->" /></td>
82 <td><!--POST.TITLE--></td>
83 <td class="table-img"><a href="/admin/editPoll.php?id=<!--POST.ID-->"><img src="/theme/images/icons/page_edit.png" alt="Edit" /></a></td>
84 <td class="table-img"><a href="#" onclick="deletePoll(<!--POST.ID-->)"><img src="/theme/images/icons/page_delete.png" alt="Delete" /></a></td>
85 <td class="table-img"><a href="/poll/<!--POST.ID-->.php"><img src="/theme/images/icons/page_go.png" alt="View" /></a></td>
86 </tr>
87 <!--END POST-->
88</table>
89
90<div class="manage-pagination"><!--PAGINATION--></div>
91<!--END AVAIL-->
92<!--BEGIN NOTAVAIL-->
93<div class="manage-pagination">There are no polls.</div>
94<!--END NOTAVAIL-->
diff --git a/theme/admin/writePoll.tpl b/theme/admin/writePoll.tpl deleted file mode 100755 index a40eb5e..0000000 --- a/theme/admin/writePoll.tpl +++ /dev/null
@@ -1,76 +0,0 @@
1<h2><!--TITLE--></h2>
2
3<form action="<!--ACTION-->" method="post" class="uniForm">
4 <!--BEGIN ISERROR-->
5 <div id="errorMsg">
6 <h3>Oops! There was an error!</h3>
7
8 <ol>
9 <!--BEGIN ERROR-->
10 <li><a href="#error<!--ERROR.ID-->" title="Jump to error"><!--ERROR.TEXT--></a></li>
11 <!--END ERROR-->
12 </ol>
13 </div>
14 <!--END ISERROR-->
15
16 <!--BEGIN FLASH-->
17 <div id="OKMsg"><p><!--FLASH.TEXT--></p></div>
18 <!--END FLASH-->
19
20 <fieldset class="inlineLabels">
21 <div class="ctrlHolder<!--ISQUESTIONERROR-->">
22 <!--BEGIN QUESTIONERROR-->
23 <p id="error<!--QUESTIONERROR.ID-->" class="errorField"><strong><!--QUESTIONERROR.TEXT--></strong></p>
24 <!--END QUESTIONERROR-->
25 <label for="question"><em>*</em> Question</label>
26 <input name="question" id="question" value="<!--QUESTIONVALUE-->" type="text" class="textInput" />
27 </div>
28
29 <div class="ctrlHolder<!--ISOPTION1ERROR-->">
30 <!--BEGIN OPTION1ERROR-->
31 <p id="error<!--OPTION1ERROR.ID-->" class="errorField"><strong><!--OPTION1ERROR.ID--></strong></p>
32 <!--END OPTION1ERROR-->
33 <label for="option1"><em>*</em> Option 1</label>
34 <input name="option1" id="option1" value="<!--OPTION1VALUE-->" type="text" class="textInput" />
35 </div>
36
37 <div class="ctrlHolder<!--ISOPTION2ERROR-->">
38 <!--BEGIN OPTION2ERROR-->
39 <p id="error<!--OPTION2ERROR.ID-->" class="errorField"><strong><!--OPTION2ERROR.ID--></strong></p>
40 <!--END OPTION2ERROR-->
41 <label for="option2"><em>*</em> Option 2</label>
42 <input name="option2" id="option2" value="<!--OPTION2VALUE-->" type="text" class="textInput" />
43 </div>
44
45 <div class="ctrlHolder<!--ISOPTION3ERROR-->">
46 <!--BEGIN OPTION3ERROR-->
47 <p id="error<!--OPTION3ERROR.ID-->" class="errorField"><strong><!--OPTION3ERROR.ID--></strong></p>
48 <!--END OPTION3ERROR-->
49 <label for="option3"><em>*</em> Option 3</label>
50 <input name="option3" id="option3" value="<!--OPTION3VALUE-->" type="text" class="textInput" />
51 </div>
52
53 <div class="ctrlHolder<!--ISOPTION4ERROR-->">
54 <!--BEGIN OPTION4ERROR-->
55 <p id="error<!--OPTION4ERROR.ID-->" class="errorField"><strong><!--OPTION4ERROR.ID--></strong></p>
56 <!--END OPTION4ERROR-->
57 <label for="option4"><em>*</em> Option 4</label>
58 <input name="option4" id="option4" value="<!--OPTION4VALUE-->" type="text" class="textInput" />
59 </div>
60 </fieldset>
61
62 <fieldset class="blockLabels">
63 <div class="ctrlHolder<!--ISTEXTERROR-->">
64 <!--BEGIN TEXTERROR-->
65 <p id="error<!--TEXTERROR.ID-->" class="errorField"><strong><!--TEXTERROR.TEXT--></strong></p>
66 <!--END TEXTERROR-->
67 <label for="text">Text</label>
68 <textarea name="text" id="text"><!--TEXTVALUE--></textarea>
69 </div>
70 </fieldset>
71
72 <div class="buttonHolder">
73 <button type="reset" class="resetButton">Reset</button>
74 <button type="submit" class="primaryAction">Submit</button>
75 </div>
76</form>