Fix field casting

This commit is contained in:
Damian Mooyman 2016-07-26 12:56:48 +12:00
parent 1c2228f508
commit d7fa00267e
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A
2 changed files with 5 additions and 2 deletions

View File

@ -20,6 +20,7 @@ $.entwine('ss', function($){
ParentCache: {}, // Cache allowed children for each selected page ParentCache: {}, // Cache allowed children for each selected page
onadd: function() { onadd: function() {
var self = this; var self = this;
// See SelectionGroup.js for logic which hides / shows ParentID
this.find('#Form_AddForm_ParentID_Holder .TreeDropdownField').bind('change', function() { this.find('#Form_AddForm_ParentID_Holder .TreeDropdownField').bind('change', function() {
self.updateTypeList(); self.updateTypeList();
}); });

View File

@ -87,8 +87,10 @@ class CMSPageAddController extends CMSPageEditController {
) )
); );
// TODO Insert page step title $parentModeField->setTitle(DBField::create_field(
$parentModeField->setTitle(sprintf($numericLabelTmpl, 1, _t('CMSMain.ChoosePageParentMode', 'Choose where to create this page'))); 'HTMLFragment',
sprintf($numericLabelTmpl, 1, _t('CMSMain.ChoosePageParentMode', 'Choose where to create this page'))
));
$parentField->setSearchFunction(function ($sourceObject, $labelField, $search) { $parentField->setSearchFunction(function ($sourceObject, $labelField, $search) {
return DataObject::get($sourceObject) return DataObject::get($sourceObject)