mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Fix field casting
This commit is contained in:
parent
1c2228f508
commit
d7fa00267e
@ -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();
|
||||||
});
|
});
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user