-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathPTGDynamic.php
More file actions
102 lines (94 loc) · 4.5 KB
/
Copy pathPTGDynamic.php
File metadata and controls
102 lines (94 loc) · 4.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
/**
* Copyright 2014 Openstack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* testing
**/
/**
* Defines the PTGDynamic page type
*/
class PTGDynamic extends Page {
private static $db = array(
'Summary' => 'HTMLText',
'WhyTheChange' => 'HTMLText',
'HotelAndTravel' => 'HTMLText',
'HotelLink' => 'VarChar(255)',
'WhoShouldAttend' => 'HTMLText',
'WhoShouldNotAttend' => 'HTMLText',
'Benefits' => 'HTMLText',
'SponsorLogos' => 'HTMLText',
'Sponsor' => 'HTMLText',
'SponsorSteps' => 'HTMLText',
'TravelSupport' => 'HTMLText',
'TravelSupportApply' => 'HTMLText',
'RegisterToAttend' => 'HTMLText',
'PTGSchedule' => 'HTMLText',
'CodeOfConduct' => 'HTMLText',
'FindOutMore' => 'HTMLText',
'FAQText' => 'HTMLText',
);
private static $has_one = array(
'Graph' => 'CloudImage',
'ScheduleImage' => 'CloudImage',
);
function getCMSFields(){
$fields = parent::getCMSFields();
$fields->removeByName('Content');
$fields->addFieldToTab('Root.Main', $summary = new HtmlEditorField('Summary','Summary'));
$summary->setRows(5);
$fields->addFieldToTab('Root.Main', $whychange = new HtmlEditorField('WhyTheChange','Why The Change'));
$whychange->setRows(5);
$fields->addFieldToTab(
'Root.Main',
$graph = UploadField::create('Graph', 'Graph')
);
$fields->addFieldToTab('Root.Main', $hotel = new HtmlEditorField('HotelAndTravel','Hotel & Travel'));
$hotel->setRows(5);
$fields->addFieldToTab('Root.Main', new TextField('HotelLink','Hotel Link'));
$fields->addFieldToTab('Root.Main', $attend = new HtmlEditorField('WhoShouldAttend','Who Should Attend'));
$attend->setRows(5);
$fields->addFieldToTab('Root.Main', $notattend = new HtmlEditorField('WhoShouldNotAttend','Who Should Not Attend'));
$notattend->setRows(5);
$fields->addFieldToTab('Root.Main', $benefit = new HtmlEditorField('Benefits','How can this benefit?'));
$benefit->setRows(5);
$fields->addFieldToTab('Root.Main', $sponsorlogos = new HtmlEditorField('SponsorLogos','Sponsor Logo Placement'));
$sponsorlogos->setRows(5);
$fields->addFieldToTab('Root.Main', $sponsor = new HtmlEditorField('Sponsor','What are PTG Events & Why Sponsor?'));
$sponsor->setRows(5);
$fields->addFieldToTab('Root.Main', $sponsor_steps = new HtmlEditorField('SponsorSteps','Steps to Sponsoring the PTG event'));
$sponsor_steps->setRows(5);
$fields->addFieldToTab('Root.Main', $travel_sup = new HtmlEditorField('TravelSupport','Travel Support Program'));
$travel_sup->setRows(5);
$fields->addFieldToTab('Root.Main', $travel_sup_app = new HtmlEditorField('TravelSupportApply','Apply for Travel Support'));
$travel_sup_app->setRows(5);
$fields->addFieldToTab('Root.Main', $register = new HtmlEditorField('RegisterToAttend','Register to Attend'));
$register->setRows(5);
$fields->addFieldToTab('Root.Main', $schedule = new HtmlEditorField('PTGSchedule','PTG Schedule'));
$schedule->setRows(5);
$fields->addFieldToTab(
'Root.Main',
$schedule_image = UploadField::create('ScheduleImage', 'Schedule')
);
$fields->addFieldToTab('Root.Main', $coc = new HtmlEditorField('CodeOfConduct','Code of Conduct'));
$coc->setRows(5);
$fields->addFieldToTab('Root.Main', $findout = new HtmlEditorField('FindOutMore','Find Out More'));
$findout->setRows(5);
$fields->addFieldToTab('Root.Main', $findout = new HtmlEditorField('FAQText','FAQs'));
$findout->setRows(5);
return $fields;
}
}
class PTGDynamic_Controller extends Page_Controller {
function init() {
parent::init();
Requirements::css('themes/openstack/css/ptg.css');
}
}