mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
commit
dccde5f512
@ -1,24 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* @package cms
|
|
||||||
* @subpackage forms
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to edit the SiteTree->URLSegment property, and suggest input based on the serverside rules
|
* Used to edit the SiteTree->URLSegment property, and suggest input based on the serverside rules
|
||||||
* defined through {@link SiteTree->generateURLSegment()} and {@link URLSegmentFilter}.
|
* defined through {@link SiteTree->generateURLSegment()} and {@link URLSegmentFilter}.
|
||||||
*
|
*
|
||||||
* Note: The actual conversion for saving the value takes place in the model layer.
|
* Note: The actual conversion for saving the value takes place in the model layer.
|
||||||
|
*
|
||||||
|
* @package cms
|
||||||
|
* @subpackage forms
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class SiteTreeURLSegmentField extends TextField {
|
class SiteTreeURLSegmentField extends TextField {
|
||||||
|
|
||||||
protected $template = 'SiteTreeURLSegmentField';
|
/**
|
||||||
|
* @var string
|
||||||
/** @var String */
|
*/
|
||||||
protected $helpText;
|
protected $helpText, $urlPrefix;
|
||||||
|
|
||||||
/** @var String */
|
|
||||||
protected $urlPrefix;
|
|
||||||
|
|
||||||
static $allowed_actions = array(
|
static $allowed_actions = array(
|
||||||
'suggest'
|
'suggest'
|
||||||
@ -81,6 +78,4 @@ class SiteTreeURLSegmentField extends TextField {
|
|||||||
function Type() {
|
function Type() {
|
||||||
return 'text sitetreeurlsegment';
|
return 'text sitetreeurlsegment';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -1898,8 +1898,10 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
)),
|
)),
|
||||||
$parentIDField = new TreeDropdownField("ParentID", $this->fieldLabel('ParentID'), 'SiteTree', 'ID', 'MenuTitle')
|
$parentIDField = new TreeDropdownField("ParentID", $this->fieldLabel('ParentID'), 'SiteTree', 'ID', 'MenuTitle')
|
||||||
),
|
),
|
||||||
new CheckboxField("ShowInMenus", $this->fieldLabel('ShowInMenus')),
|
$visibility = new FieldGroup(
|
||||||
new CheckboxField("ShowInSearch", $this->fieldLabel('ShowInSearch'))
|
new CheckboxField("ShowInMenus", $this->fieldLabel('ShowInMenus')),
|
||||||
|
new CheckboxField("ShowInSearch", $this->fieldLabel('ShowInSearch'))
|
||||||
|
)
|
||||||
),
|
),
|
||||||
$tabAccess = new Tab('Access',
|
$tabAccess = new Tab('Access',
|
||||||
$viewersOptionsField = new OptionsetField(
|
$viewersOptionsField = new OptionsetField(
|
||||||
@ -1918,6 +1920,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$visibility->setTitle($this->fieldLabel('Visibility'));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This filter ensures that the ParentID dropdown selection does not show this node,
|
* This filter ensures that the ParentID dropdown selection does not show this node,
|
||||||
* or its descendents, as this causes vanishing bugs.
|
* or its descendents, as this causes vanishing bugs.
|
||||||
@ -2001,6 +2005,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
$labels['CanViewType'] = _t('SiteTree.Viewers', 'Viewers Groups');
|
$labels['CanViewType'] = _t('SiteTree.Viewers', 'Viewers Groups');
|
||||||
$labels['CanEditType'] = _t('SiteTree.Editors', 'Editors Groups');
|
$labels['CanEditType'] = _t('SiteTree.Editors', 'Editors Groups');
|
||||||
$labels['Comments'] = _t('SiteTree.Comments', 'Comments');
|
$labels['Comments'] = _t('SiteTree.Comments', 'Comments');
|
||||||
|
$labels['Visibility'] = _t('SiteTree.Visibility', 'Visibility');
|
||||||
$labels['LinkChangeNote'] = _t (
|
$labels['LinkChangeNote'] = _t (
|
||||||
'SiteTree.LINKCHANGENOTE', 'Changing this page\'s link will also affect the links of all child pages.'
|
'SiteTree.LINKCHANGENOTE', 'Changing this page\'s link will also affect the links of all child pages.'
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user