Last change
on this file since 80 was
78,
checked in by basvannuland, 14 years ago
|
save and load application
start with save and load session
|
File size:
1.6 KB
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | /** |
---|
4 | * Description of ApplicationMenu |
---|
5 | * |
---|
6 | * @author fpvanagthoven |
---|
7 | */ |
---|
8 | class ApplicationMenu extends Menu { |
---|
9 | |
---|
10 | public function __construct($applications) { |
---|
11 | ?><fieldset class="menu"><?php |
---|
12 | parent::__construct('Application'); |
---|
13 | ?> <div class="menuButtons"> <?php |
---|
14 | ApplicationMenu::createApplicationButton(); |
---|
15 | ApplicationMenu::loadApplicationButton(); |
---|
16 | ?> </div> <?php |
---|
17 | ApplicationMenu::loadApplicationList($applications); |
---|
18 | ?></fieldset><?php |
---|
19 | } |
---|
20 | |
---|
21 | public static function createApplicationButton() { |
---|
22 | ?> |
---|
23 | |
---|
24 | <form action="applicationcreation.php" method="post"> |
---|
25 | |
---|
26 | <input type="submit" value="New" class="surveyButton bigSurveyButton" /> |
---|
27 | |
---|
28 | </form> |
---|
29 | |
---|
30 | <?php |
---|
31 | } |
---|
32 | |
---|
33 | /** |
---|
34 | * |
---|
35 | * @param Survey $surveys An array of surveys |
---|
36 | */ |
---|
37 | public static function loadApplicationButton() { |
---|
38 | ?> |
---|
39 | <form id="loadApplicationForm" action="applicationcreation.php" method="post"> |
---|
40 | <input type="button" onclick="loadApplication()" value="Load / Edit" class="surveyButton bigSurveyButton" /> |
---|
41 | </form> |
---|
42 | |
---|
43 | |
---|
44 | <?php |
---|
45 | } |
---|
46 | |
---|
47 | public static function loadApplicationList($applications) { |
---|
48 | ?> |
---|
49 | <select id="applicationsToLoad" class="toLoad" size="1000"> |
---|
50 | <?php |
---|
51 | if (!empty($applications)) { |
---|
52 | foreach ($applications as $application) { |
---|
53 | ?><option value='<?php echo $application->id; ?>'><?php echo $application->title; ?></option><?php |
---|
54 | } |
---|
55 | } |
---|
56 | ?> |
---|
57 | </select> |
---|
58 | <?php |
---|
59 | } |
---|
60 | |
---|
61 | } |
---|
62 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.