source: Dev/trunk/classes/ApplicationCreationTool.php @ 75

Last change on this file since 75 was 75, checked in by fpvanagthoven, 14 years ago

Application should now just be RDF-saved. Beginning on DashboardTool?.php.

File size: 1.6 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 ApplicationCreationTool
9 *
10 * @author fpvanagthoven
11 */
12class ApplicationCreationTool
13{
14        private $application;
15
16        public function __construct($application = null)
17        {
18                $this->application = $application;
19
20                $this->javascript();
21
22                $this->init();
23        }
24
25        private function javascript()
26        {
27                ?>
28                <script type="text/javascript" src="js/creation.js"></script>
29                <script language="JavaScript" type="text/javascript">
30
31                </script>
32                <?php
33        }
34
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("\"", "&quot;", $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        }
79}
80?>
Note: See TracBrowser for help on using the repository browser.