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
onadd: function() {
var self = this;
// See SelectionGroup.js for logic which hides / shows ParentID
this.find('#Form_AddForm_ParentID_Holder .TreeDropdownField').bind('change', function() {
self.updateTypeList();
});

View File

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