Last change
on this file since 59 was
59,
checked in by fpvanagthoven, 14 years ago
|
Absolutely had to do something about styling. Also some other things.
|
File size:
1.7 KB
|
Rev | Line | |
---|
[57] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | * To change this template, choose Tools | Templates |
---|
| 4 | * and open the template in the editor. |
---|
| 5 | */ |
---|
| 6 | |
---|
| 7 | /** |
---|
| 8 | * Description of SurveyMenu |
---|
| 9 | * |
---|
| 10 | * @author fpvanagthoven |
---|
| 11 | */ |
---|
| 12 | class SurveyMenu { |
---|
| 13 | |
---|
| 14 | public function __construct($surveys) { |
---|
[58] | 15 | ?> <div id="menu3" class="menu"> <?php |
---|
| 16 | ?> <div class="menuButtons"> <?php |
---|
[57] | 17 | SurveyMenu::newSurveyButton(); |
---|
[58] | 18 | SurveyMenu::loadSurveyButton(); |
---|
[59] | 19 | SurveyMenu::deleteSurveyButton(); |
---|
[58] | 20 | ?> </div> <?php |
---|
| 21 | SurveyMenu::loadSurveyList($surveys); |
---|
| 22 | ?> </div> <?php |
---|
[57] | 23 | } |
---|
| 24 | |
---|
| 25 | public static function newSurveyButton() { |
---|
| 26 | ?> |
---|
| 27 | |
---|
| 28 | <form action="surveycreation.php" method="post"> |
---|
| 29 | |
---|
| 30 | <input type="submit" value="Create new survey" class="surveyButton bigSurveyButton" /> |
---|
| 31 | |
---|
| 32 | </form> |
---|
| 33 | |
---|
| 34 | <?php |
---|
| 35 | } |
---|
| 36 | |
---|
[58] | 37 | public static function loadSurveyButton() { |
---|
[57] | 38 | ?> |
---|
| 39 | <form id="loadForm" action="surveycreation.php" method="post"> |
---|
[58] | 40 | <input type="button" onclick="loadSurvey()" value="Load/Edit survey" class="surveyButton bigSurveyButton" /> |
---|
[57] | 41 | </form> |
---|
[58] | 42 | <?php |
---|
| 43 | } |
---|
| 44 | |
---|
[59] | 45 | public static function deleteSurveyButton() { |
---|
| 46 | ?> |
---|
| 47 | <form action="" method="post"> |
---|
| 48 | <input type="button" onclick="delSurvey()" value="Delete survey" class="surveyButton bigSurveyButton" /> |
---|
| 49 | </form> |
---|
| 50 | <?php |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | /** |
---|
| 54 | * |
---|
| 55 | * @param Survey $surveys An array of surveys |
---|
| 56 | */ |
---|
[58] | 57 | public static function loadSurveyList($surveys) { |
---|
| 58 | ?> |
---|
| 59 | <select id="surveysToLoad" class="toLoad" size="1000"> |
---|
[57] | 60 | <?php |
---|
| 61 | foreach ($surveys as $survey) { |
---|
| 62 | ?><option value='<?php echo $survey->id; ?>'><?php echo $survey->title; ?></option><?php |
---|
| 63 | } |
---|
| 64 | ?> |
---|
| 65 | </select> |
---|
| 66 | <?php |
---|
| 67 | } |
---|
| 68 | |
---|
| 69 | } |
---|
| 70 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.