From 85315257891869ce6fa7ef5a3e14c8fcbc4a3ff6 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Sat, 14 Apr 2012 18:15:49 +1200 Subject: [PATCH 1/2] MINOR: remove $template var as sapphire/07d2d52 will pick this up automatically --- code/forms/SiteTreeURLSegmentField.php | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/code/forms/SiteTreeURLSegmentField.php b/code/forms/SiteTreeURLSegmentField.php index 9c7329ad..504dc68c 100644 --- a/code/forms/SiteTreeURLSegmentField.php +++ b/code/forms/SiteTreeURLSegmentField.php @@ -1,24 +1,21 @@ URLSegment property, and suggest input based on the serverside rules * defined through {@link SiteTree->generateURLSegment()} and {@link URLSegmentFilter}. * * Note: The actual conversion for saving the value takes place in the model layer. + * + * @package cms + * @subpackage forms */ + class SiteTreeURLSegmentField extends TextField { - protected $template = 'SiteTreeURLSegmentField'; - - /** @var String */ - protected $helpText; - - /** @var String */ - protected $urlPrefix; + /** + * @var string + */ + protected $helpText, $urlPrefix; static $allowed_actions = array( 'suggest' @@ -81,6 +78,4 @@ class SiteTreeURLSegmentField extends TextField { function Type() { return 'text sitetreeurlsegment'; } - - } \ No newline at end of file From d4750c2a967cbbaeb03173b029d91407aba61adc Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Sat, 14 Apr 2012 18:16:47 +1200 Subject: [PATCH 2/2] MINOR: group ShowInMenus and ShowInSearch check boxes. Fixes #6901 --- code/model/SiteTree.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/model/SiteTree.php b/code/model/SiteTree.php index 3ec577de..3a0be5f7 100644 --- a/code/model/SiteTree.php +++ b/code/model/SiteTree.php @@ -1898,8 +1898,10 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid )), $parentIDField = new TreeDropdownField("ParentID", $this->fieldLabel('ParentID'), 'SiteTree', 'ID', 'MenuTitle') ), - new CheckboxField("ShowInMenus", $this->fieldLabel('ShowInMenus')), - new CheckboxField("ShowInSearch", $this->fieldLabel('ShowInSearch')) + $visibility = new FieldGroup( + new CheckboxField("ShowInMenus", $this->fieldLabel('ShowInMenus')), + new CheckboxField("ShowInSearch", $this->fieldLabel('ShowInSearch')) + ) ), $tabAccess = new Tab('Access', $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, * 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['CanEditType'] = _t('SiteTree.Editors', 'Editors Groups'); $labels['Comments'] = _t('SiteTree.Comments', 'Comments'); + $labels['Visibility'] = _t('SiteTree.Visibility', 'Visibility'); $labels['LinkChangeNote'] = _t ( 'SiteTree.LINKCHANGENOTE', 'Changing this page\'s link will also affect the links of all child pages.' );