Last change
on this file since 51 was
38,
checked in by fpvanagthoven, 14 years ago
|
Surveys can be loaded with UID.
|
File size:
1.1 KB
|
Rev | Line | |
---|
[10] | 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 NewSurveyButton |
---|
| 9 | * |
---|
| 10 | * @author fpvanagthoven |
---|
| 11 | */ |
---|
[36] | 12 | class SurveyButton { |
---|
[10] | 13 | |
---|
| 14 | public function __construct() { |
---|
[36] | 15 | |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | public static function newSurveyButton() { |
---|
[10] | 19 | ?> |
---|
| 20 | |
---|
| 21 | <form action="surveycreation.php" method="post"> |
---|
| 22 | |
---|
[36] | 23 | <input type="submit" value="Create new survey" class="surveyButton bigSurveyButton" /> |
---|
[10] | 24 | |
---|
| 25 | </form> |
---|
| 26 | |
---|
| 27 | <?php |
---|
| 28 | } |
---|
| 29 | |
---|
[38] | 30 | /** |
---|
| 31 | * |
---|
| 32 | * @param Survey $surveys An array of surveys |
---|
| 33 | */ |
---|
| 34 | public static function loadSurveyButton($surveys) { |
---|
[36] | 35 | ?> |
---|
[38] | 36 | <form id="loadForm" action="surveycreation.php" method="post"> |
---|
| 37 | <input type="button" onclick="loadSurvey()" value="Load survey" class="surveyButton bigSurveyButton" /> |
---|
[36] | 38 | </form> |
---|
[38] | 39 | <br/> |
---|
| 40 | <select id="surveysToLoad" size="1000"> |
---|
| 41 | <?php |
---|
| 42 | foreach ($surveys as $survey) { |
---|
| 43 | ?><option value='<?php echo $survey->id; ?>'><?php echo $survey->title; ?></option><?php |
---|
| 44 | } |
---|
| 45 | ?> |
---|
| 46 | </select> |
---|
[36] | 47 | <?php |
---|
| 48 | } |
---|
| 49 | |
---|
[10] | 50 | } |
---|
| 51 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.