Rev | Line | |
---|
[66] | 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 ApplicationCreationTool |
---|
| 9 | * |
---|
| 10 | * @author fpvanagthoven |
---|
| 11 | */ |
---|
[75] | 12 | class ApplicationCreationTool |
---|
| 13 | { |
---|
| 14 | private $application; |
---|
[66] | 15 | |
---|
[75] | 16 | public function __construct($application = null) |
---|
| 17 | { |
---|
| 18 | $this->application = $application; |
---|
[66] | 19 | |
---|
[75] | 20 | $this->javascript(); |
---|
[66] | 21 | |
---|
[75] | 22 | $this->init(); |
---|
| 23 | } |
---|
[66] | 24 | |
---|
[75] | 25 | private function javascript() |
---|
| 26 | { |
---|
| 27 | ?> |
---|
| 28 | <script type="text/javascript" src="js/creation.js"></script> |
---|
| 29 | <script language="JavaScript" type="text/javascript"> |
---|
[66] | 30 | |
---|
[75] | 31 | </script> |
---|
| 32 | <?php |
---|
| 33 | } |
---|
[66] | 34 | |
---|
[75] | 35 | private function init() |
---|
| 36 | { |
---|
| 37 | ?> |
---|
| 38 | <div class="creation"> |
---|
| 39 | <form id="applicationCreationForm" action="" method="post"> |
---|
| 40 | <?php |
---|
| 41 | $this->title(); |
---|
| 42 | $this->description(); |
---|
| 43 | |
---|
| 44 | $this->done(); |
---|
| 45 | ?> |
---|
| 46 | </form> |
---|
| 47 | </div> |
---|
| 48 | <?php |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | private function title() |
---|
| 52 | { |
---|
| 53 | if (isset($this->application->title)) |
---|
| 54 | $value = $this->application->title; |
---|
| 55 | else |
---|
| 56 | $value = 'Untitled Application'; |
---|
| 57 | ?> |
---|
| 58 | <input type="text" id="applicationTitle" class="titleBox" name="applicationTitle" value="<?php echo str_replace("\"", """, $value); ?>" onblur="handleBlur(this)" onfocus="handleFocus(this)" /> |
---|
| 59 | <?php |
---|
| 60 | } |
---|
| 61 | |
---|
| 62 | private function description() |
---|
| 63 | { |
---|
| 64 | if (isset($this->application->description)) |
---|
| 65 | $value = $this->application->description; |
---|
| 66 | else |
---|
| 67 | $value = 'Write a description for this application here.'; |
---|
| 68 | ?> |
---|
| 69 | <textarea id="applicationDescription" class="descriptionBox" name="applicationDescription" onblur="handleBlur(this)" onfocus="handleFocus(this)"><?php echo $value; ?></textarea> |
---|
| 70 | <?php |
---|
| 71 | } |
---|
| 72 | |
---|
| 73 | private function done() |
---|
| 74 | { |
---|
| 75 | ?> |
---|
| 76 | <input type="submit" class="surveyButton topRight" value="Done" /> |
---|
| 77 | <?php |
---|
| 78 | } |
---|
[66] | 79 | } |
---|
| 80 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.