[smarcet]

* ss3 migration fixes.

Conflicts:

	marketplace/code/model/consultants/ISpokenLanguage.php
This commit is contained in:
Sebastian Marcet 2014-11-20 15:44:55 -03:00
parent 6900a186cf
commit df46bd5a0d
20 changed files with 55 additions and 55 deletions

View File

@ -67,7 +67,7 @@ final class TeamInvitationConfirmation_Controller extends AbstractController {
try{ try{
$current_member = Member::currentUser(); $current_member = Member::currentUser();
if(is_null($current_member)) if(is_null($current_member))
return Director::redirect("Security/login?BackURL=" . urlencode($_SERVER['REQUEST_URI'])); return Controller::curr()->redirect("Security/login?BackURL=" . urlencode($_SERVER['REQUEST_URI']));
$team = $this->team_manager->confirmInvitation($token, $current_member); $team = $this->team_manager->confirmInvitation($token, $current_member);
return $this->renderWith( array('TeamInvitationConfirmation_successfull','Page') , array('TeamName' => $team->getName() , 'CompanyName' => $team->getCompany()->Name ) ); return $this->renderWith( array('TeamInvitationConfirmation_successfull','Page') , array('TeamName' => $team->getName() , 'CompanyName' => $team->getCompany()->Name ) );
} }

View File

@ -18,7 +18,7 @@ final class FoundationMember
extends DataExtension extends DataExtension
implements IFoundationMember, ICommunityMember { implements IFoundationMember, ICommunityMember {
static $has_many = array( private static $has_many = array(
'RevocationNotifications' => 'FoundationMemberRevocationNotification', 'RevocationNotifications' => 'FoundationMemberRevocationNotification',
'Votes' => 'Vote' 'Votes' => 'Vote'
); );

View File

@ -107,7 +107,6 @@ class JobPage
$fields->addFieldToTab('Root.Main', $JobPostedDate, 'Content'); $fields->addFieldToTab('Root.Main', $JobPostedDate, 'Content');
$fields->addFieldToTab('Root.Main', new DateField_Disabled('ExpirationDate','Expiration Date'), 'Content'); $fields->addFieldToTab('Root.Main', new DateField_Disabled('ExpirationDate','Expiration Date'), 'Content');
//$fields->addFieldToTab('Root.Content.Main', new TextField('JobLocation','Job Location'), 'Content');
$fields->addFieldToTab('Root.Main', new TextField('JobMoreInfoLink','More Information About This Job (URL)'), 'Content'); $fields->addFieldToTab('Root.Main', new TextField('JobMoreInfoLink','More Information About This Job (URL)'), 'Content');
$fields->addFieldToTab('Root.Main', new TextField('JobCompany','Company'), 'Content'); $fields->addFieldToTab('Root.Main', new TextField('JobCompany','Company'), 'Content');
$fields->addFieldToTab('Root.Main', new HtmlEditorField('JobInstructions2Apply','Job Instructions to Apply'), 'Content'); $fields->addFieldToTab('Root.Main', new HtmlEditorField('JobInstructions2Apply','Job Instructions to Apply'), 'Content');

View File

@ -1,5 +1,6 @@
<?php/** <?php
* Copyright 2014 Openstack Foundation /**
* Copyright 2014 Openstack.org
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at

View File

@ -35,8 +35,8 @@ class MarketplaceModelAdmin extends ModelAdmin {
); );
public $showImportForm = false; public $showImportForm = false;
static $url_segment = 'marketplace'; private static $url_segment = 'marketplace';
static $menu_title = 'Marketplace'; private static $menu_title = 'Marketplace';
public function init() public function init()
{ {

View File

@ -78,7 +78,7 @@ final class NewsRequestForm extends HoneyPotForm {
$SubmitterPhoneField = new TextField('submitter_phone','Phone'); $SubmitterPhoneField = new TextField('submitter_phone','Phone');
} }
$fields = new FieldSet ( $fields = new FieldList (
$IDField, $IDField,
$HeadlineField, $HeadlineField,
$SummaryField, $SummaryField,
@ -132,13 +132,12 @@ final class NewsRequestForm extends HoneyPotForm {
// Create action // Create action
$actions = new FieldSet(); $actions = new FieldList();
$actions->push(new FormAction('saveNewsArticle', 'Save')); $actions->push(new FormAction('saveNewsArticle', 'Save'));
// Create validators // Create validators
$validator = new ConditionalAndValidationRule(array(new RequiredFields('headline','summary','tags','date'))); $validator = new ConditionalAndValidationRule(array(new RequiredFields('headline','summary','tags','date')));
$validator->setJavascriptValidationHandler('none'); $this->addExtraClass('news-registration-form');
$this->addExtraClass('news-registration-form');
parent::__construct($controller, $name, $fields, $actions, $validator); parent::__construct($controller, $name, $fields, $actions, $validator);
} }

View File

@ -97,12 +97,12 @@ final class NewsRequestPage_Controller extends Page_Controller {
if ($data["Image"]["size"] > 1000000) { if ($data["Image"]["size"] > 1000000) {
$form->addErrorMessage("Image", 'The image you have attached is too big. It must be less than 1MB in size.', "bad"); $form->addErrorMessage("Image", 'The image you have attached is too big. It must be less than 1MB in size.', "bad");
Session::set("FormInfo.Form_NewsRequestForm.data", $data); Session::set("FormInfo.Form_NewsRequestForm.data", $data);
return Director::redirect('/news-add/?error=1'); return Controller::curr()->redirect('/news-add/?error=1');
} }
if ($data["Document"]["size"] > 1000000) { if ($data["Document"]["size"] > 1000000) {
$form->addErrorMessage("Image", 'The image you have attached is too big. It must be less than 1MB in size.', "bad"); $form->addErrorMessage("Image", 'The image you have attached is too big. It must be less than 1MB in size.', "bad");
Session::set("FormInfo.Form_NewsRequestForm.data", $data); Session::set("FormInfo.Form_NewsRequestForm.data", $data);
return Director::redirect('/news-add/?error=1'); return Controller::curr()->redirect('/news-add/?error=1');
} }
try{ try{
@ -113,7 +113,7 @@ final class NewsRequestPage_Controller extends Page_Controller {
} }
Session::clear("FormInfo.Form_NewsRequestForm.data"); Session::clear("FormInfo.Form_NewsRequestForm.data");
return Director::redirect('/news-add/?saved=1'); return Controller::curr()->redirect('/news-add/?saved=1');
} }
catch(EntityValidationException $ex1){ catch(EntityValidationException $ex1){
$messages = $ex1->getMessages(); $messages = $ex1->getMessages();

View File

@ -106,7 +106,7 @@ class OpenstackUser extends Page {
// //
// Hide unneeded tabs and rename the main tab // Hide unneeded tabs and rename the main tab
// //
$fields->removeFieldsFromTab('Root.Content', $fields->removeFieldsFromTab('Root',
array( array(
'GoogleSitemap' 'GoogleSitemap'
) )

View File

@ -40,15 +40,15 @@ class Page extends SiteTree {
$fields = parent::getCMSFields(); $fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Settings', new TextField ('PageCSS','Custom CSS File For This Page (must be in CSS directory)')); $fields->addFieldToTab('Root.Settings', new TextField ('PageCSS','Custom CSS File For This Page (must be in CSS directory)'));
$fields->addFieldToTab('Root.Content.Settings', new CheckboxField ('IncludeJquery','Include JQuery In This Page')); $fields->addFieldToTab('Root.Settings', new CheckboxField ('IncludeJquery','Include JQuery In This Page'));
$fields->addFieldToTab('Root.Content.Settings', new CheckboxField ('IncludeShadowBox','Include ShadowBox Javascript and CSS')); $fields->addFieldToTab('Root.Settings', new CheckboxField ('IncludeShadowBox','Include ShadowBox Javascript and CSS'));
$fields->addFieldToTab('Root.Content.Settings', new TextareaField ('PageJavaScript','Custom JavaScript For This Page')); $fields->addFieldToTab('Root.Settings', new TextareaField ('PageJavaScript','Custom JavaScript For This Page'));
$fields->addFieldToTab('Root.Content.Settings', new CheckboxField ('BootstrapConverted','Converted To Bootstrap')); $fields->addFieldToTab('Root.Settings', new CheckboxField ('BootstrapConverted','Converted To Bootstrap'));
return $fields; return $fields;
} }

View File

@ -126,7 +126,7 @@ class Presentation extends DataObject
if (!$this->PresentationCategoryPageID) { if (!$this->PresentationCategoryPageID) {
$SummitPageID = 0; $SummitPageID = 0;
$SummitRedirector = DataObject::get_by_id('RedirectorPage', 154); $SummitRedirector = RedirectorPage::get()->byID(154);
If ($SummitRedirector) { If ($SummitRedirector) {
$SummitPageID = $SummitRedirector->LinkToID; $SummitPageID = $SummitRedirector->LinkToID;
$VideoPage = DataObject::get_one('PresentationCategoryPage', '`ParentID` = ' . $SummitPageID); $VideoPage = DataObject::get_one('PresentationCategoryPage', '`ParentID` = ' . $SummitPageID);
@ -173,7 +173,7 @@ class Presentation extends DataObject
function PopulateFromSchedEvent($SchedEventID) function PopulateFromSchedEvent($SchedEventID)
{ {
$SchedEvent = DataObject::get_by_id('SchedEvent', $SchedEventID); $SchedEvent = SchedEvent::get()->byID($SchedEventID);
$this->Name = $SchedEvent->eventtitle; $this->Name = $SchedEvent->eventtitle;
$this->DisplayOnSite = TRUE; $this->DisplayOnSite = TRUE;

View File

@ -18,17 +18,18 @@
*/ */
class PresentationCategoryPage extends Page class PresentationCategoryPage extends Page
{ {
static $db = array( private static $db = array(
'StillUploading' => 'Boolean' 'StillUploading' => 'Boolean'
); );
static $has_one = array();
static $has_many = array( private static $has_one = array();
private static $has_many = array(
'Presentations' => 'Presentation', 'Presentations' => 'Presentation',
'FeaturedVideos' => 'FeaturedVideo' 'FeaturedVideos' => 'FeaturedVideo'
); );
static $allowed_children = array('PresentationCategoryPage'); private static $allowed_children = array('PresentationCategoryPage');
/** static $icon = "icon/path"; */ /** static $icon = "icon/path"; */
@ -37,7 +38,7 @@ class PresentationCategoryPage extends Page
$fields = parent::getCMSFields(); $fields = parent::getCMSFields();
$presentationsTable = new GridField('Presentations', 'Presentations', $this->Presentations(),GridFieldConfig_RecordEditor::create(10)); $presentationsTable = new GridField('Presentations', 'Presentations', $this->Presentations(),GridFieldConfig_RecordEditor::create(10));
$fields->addFieldToTab('Root.Content.Presentations', $presentationsTable); $fields->addFieldToTab('Root.Presentations', $presentationsTable);
// Summit Videos // Summit Videos
$VideosUploadingField = new OptionSetField('StillUploading', 'Are videos still being uploaded?', array( $VideosUploadingField = new OptionSetField('StillUploading', 'Are videos still being uploaded?', array(
@ -45,10 +46,10 @@ class PresentationCategoryPage extends Page
'0' => 'No' '0' => 'No'
)); ));
$fields->addFieldToTab("Root.Content.Main", $VideosUploadingField, 'Content'); $fields->addFieldToTab("Root.Main", $VideosUploadingField, 'Content');
$featuredVideos = new GridField('FeaturedVideos', 'FeaturedVideos', $this->FeaturedVideos(),GridFieldConfig_RecordEditor::create(10)); $featuredVideos = new GridField('FeaturedVideos', 'FeaturedVideos', $this->FeaturedVideos(),GridFieldConfig_RecordEditor::create(10));
$fields->addFieldToTab('Root.Content.FeaturedVideos', $featuredVideos); $fields->addFieldToTab('Root.FeaturedVideos', $featuredVideos);
return $fields; return $fields;
@ -82,7 +83,7 @@ class PresentationCategoryPage_Controller extends Page_Controller
Session::set('Day', 1); Session::set('Day', 1);
} }
if (Director::urlParam("OtherID") != "presentation") Session::set('Autoplay', TRUE); if ($this->getRequest()->getVar("OtherID") != "presentation") Session::set('Autoplay', TRUE);
} }
//Show the Presentation detail page using the PresentationCategoryPage_presentation.ss template //Show the Presentation detail page using the PresentationCategoryPage_presentation.ss template

View File

@ -269,7 +269,7 @@ class CountryCodes {
public static function asObject(){ public static function asObject(){
$country_array = CountryCodes::$iso_3166_countryCodes; $country_array = CountryCodes::$iso_3166_countryCodes;
$list = new DataObjectSet(); $list = new ArrayList();
foreach($country_array as $k => $v){ foreach($country_array as $k => $v){
$do = new DataObject(); $do = new DataObject();
$do->Code = $k; $do->Code = $k;

View File

@ -90,7 +90,7 @@ class Deployment extends DataObject
{ {
$fields = new FieldSet( $fields = new FieldList(
$rootTab = new TabSet("Root", $rootTab = new TabSet("Root",
$tabContent = new TabSet('Content', $tabContent = new TabSet('Content',
new Tab('Main'), new Tab('Main'),
@ -98,7 +98,7 @@ class Deployment extends DataObject
)) ))
); );
$fields->addFieldsToTab('Root.Content.Main', $fields->addFieldsToTab('Root.Main',
array( array(
new TextField('Label', 'Deployment Name'), new TextField('Label', 'Deployment Name'),
new OptionSetField( new OptionSetField(
@ -128,7 +128,7 @@ class Deployment extends DataObject
'Other workloads or applications running in your Openstack environment. (optional)'), 'Other workloads or applications running in your Openstack environment. (optional)'),
)); ));
$fields->addFieldsToTab('Root.Content.Details', $fields->addFieldsToTab('Root.Details',
array( array(
new LiteralField('Break', '<p>The information below will help us better understand new LiteralField('Break', '<p>The information below will help us better understand

View File

@ -22,8 +22,8 @@ final class DeploymentAdmin extends ModelAdmin {
); );
public $showImportForm = false; public $showImportForm = false;
static $url_segment = 'deployments'; private static $url_segment = 'deployments';
static $menu_title = 'Deployments'; private static $menu_title = 'Deployments';
/** /**
* @param string $collection_controller_class Override for controller class * @param string $collection_controller_class Override for controller class

View File

@ -31,13 +31,13 @@ class DeploymentSurveyPage extends Page
{ {
$fields = parent::getCMSFields(); $fields = parent::getCMSFields();
//login page content //login page content
$fields->addFieldToTab('Root.Content.Login', new HtmlEditorField('LoginPageTitle','Page Main Title',10)); $fields->addFieldToTab('Root.Login', new HtmlEditorField('LoginPageTitle','Page Main Title',10));
$fields->addFieldToTab('Root.Content.Login', new HtmlEditorField('LoginPageContent','Content')); $fields->addFieldToTab('Root.Login', new HtmlEditorField('LoginPageContent','Content'));
$fields->addFieldToTab('Root.Content.Login', new HtmlEditorField('LoginPageSlide1Content','Slide #1 Content',20)); $fields->addFieldToTab('Root.Login', new HtmlEditorField('LoginPageSlide1Content','Slide #1 Content',20));
$fields->addFieldToTab('Root.Content.Login', new HtmlEditorField('LoginPageSlide2Content','Slide #2 Content',20)); $fields->addFieldToTab('Root.Login', new HtmlEditorField('LoginPageSlide2Content','Slide #2 Content',20));
$fields->addFieldToTab('Root.Content.Login', new HtmlEditorField('LoginPageSlide3Content','Slide #3 Content',20)); $fields->addFieldToTab('Root.Login', new HtmlEditorField('LoginPageSlide3Content','Slide #3 Content',20));
//thank u content //thank u content
$fields->addFieldToTab('Root.Content.Thank You', new HtmlEditorField('ThankYouContent','Content')); $fields->addFieldToTab('Root.Thank You', new HtmlEditorField('ThankYouContent','Content'));
return $fields; return $fields;
} }

View File

@ -59,7 +59,7 @@ class Summit extends DataObject {
} }
public function CurrentSummit() { public function CurrentSummit() {
return DataObject::get_by_id('Summit',$this->CurrentSummitID()); return Summit::get()->byID($this->CurrentSummitID());
} }
} }

View File

@ -18,6 +18,6 @@ class SummitAdmin extends ModelAdmin {
'SummitCategory' 'SummitCategory'
); );
static $url_segment = 'summits'; private static $url_segment = 'summits';
static $menu_title = 'Summits'; private static $menu_title = 'Summits';
} }

View File

@ -1,6 +1,6 @@
<div class="container"> <div class="container">
<!-- Start Videos --> <!-- Start Videos -->
<% control Presentations.GroupedBy(PresentationDay) %> <% loop Presentations.GroupedBy(PresentationDay) %>
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<h2 id="day-{$Pos}">$PresentationDay</h2> <h2 id="day-{$Pos}">$PresentationDay</h2>
@ -9,7 +9,7 @@
<div class="row"> <div class="row">
<% control Children %> <% loop Children %>
<!-- Video Block --> <!-- Video Block -->
<% if YouTubeID %> <% if YouTubeID %>
@ -37,8 +37,8 @@
</div> </div>
<% end_if %> <% end_if %>
<% end_control %> <% end_loop %>
<% end_control %> <% end_loop %>
</div> </div>
</div> </div>

View File

@ -37,7 +37,7 @@
</div> </div>
<div class="container daily-recap-wrapper"> <div class="container daily-recap-wrapper">
<div class="row"> <div class="row">
<% control FeaturedVideos %> <% loop FeaturedVideos %>
<!-- If there is a YouTube ID --> <!-- If there is a YouTube ID -->
@ -70,7 +70,7 @@
<% end_if %> <% end_if %>
<% end_control %> <% end_loop %>
</div> </div>
</div> </div>
@ -88,9 +88,9 @@
<li role="presentation"><a role="menuitem" tabindex="-1" href="{$Top.Link}#keynotes">Keynote Presentations</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="{$Top.Link}#keynotes">Keynote Presentations</a></li>
<% control Presentations.GroupedBy(PresentationDay) %> <% loop Presentations.GroupedBy(PresentationDay) %>
<li role="presentation"><a role="menuitem" tabindex="-1" href="{$Top.Link}#day-{$Pos}">$PresentationDay</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="{$Top.Link}#day-{$Pos}">$PresentationDay</a></li>
<% end_control %> <% end_loop %>
</ul> </ul>
</div> </div>

View File

@ -1,6 +1,6 @@
<% require themedCSS(videos) %> <% require themedCSS(videos) %>
<% control Presentation %> <% loop Presentation %>
<div class="main-video-wrapper"> <div class="main-video-wrapper">
<iframe width="853" height="480" src="//www.youtube.com/embed/{$YouTubeID}?rel=0<% if Top.Autoplay %>&autoplay=1<% end_if %>" frameborder="0" allowfullscreen></iframe> <iframe width="853" height="480" src="//www.youtube.com/embed/{$YouTubeID}?rel=0<% if Top.Autoplay %>&autoplay=1<% end_if %>" frameborder="0" allowfullscreen></iframe>
@ -18,7 +18,7 @@
</div> </div>
</div> </div>
<% end_control %> <% end_loop %>
<% include VideoThumbnails %> <% include VideoThumbnails %>