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
|
Line | |
---|
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 | */ |
---|
12 | class SurveyButton { |
---|
13 | |
---|
14 | public function __construct() { |
---|
15 | |
---|
16 | } |
---|
17 | |
---|
18 | public static function newSurveyButton() { |
---|
19 | ?> |
---|
20 | |
---|
21 | <form action="surveycreation.php" method="post"> |
---|
22 | |
---|
23 | <input type="submit" value="Create new survey" class="surveyButton bigSurveyButton" /> |
---|
24 | |
---|
25 | </form> |
---|
26 | |
---|
27 | <?php |
---|
28 | } |
---|
29 | |
---|
30 | /** |
---|
31 | * |
---|
32 | * @param Survey $surveys An array of surveys |
---|
33 | */ |
---|
34 | public static function loadSurveyButton($surveys) { |
---|
35 | ?> |
---|
36 | <form id="loadForm" action="surveycreation.php" method="post"> |
---|
37 | <input type="button" onclick="loadSurvey()" value="Load survey" class="surveyButton bigSurveyButton" /> |
---|
38 | </form> |
---|
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> |
---|
47 | <?php |
---|
48 | } |
---|
49 | |
---|
50 | } |
---|
51 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.