Skip to content
Browse files

Merge pull request #100 from silverstripe/trac-6901

Trac #6901
  • Loading branch information...
2 parents dc0168d + d4750c2 commit dccde5f512613bb568ab80c8dea0373ff740ba08 @halkyon halkyon committed Apr 14, 2012
Showing with 15 additions and 15 deletions.
  1. +8 −13 code/forms/SiteTreeURLSegmentField.php
  2. +7 −2 code/model/SiteTree.php
View
21 code/forms/SiteTreeURLSegmentField.php
@@ -1,24 +1,21 @@
<?php
-/**
- * @package cms
- * @subpackage forms
- */
/**
* Used to edit the SiteTree->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 @@ function getURLPrefix(){
function Type() {
return 'text sitetreeurlsegment';
}
-
-
}
View
9 code/model/SiteTree.php
@@ -1898,8 +1898,10 @@ function getSettingsFields() {
)),
$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 @@ function getSettingsFields() {
)
);
+ $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 @@ function fieldLabels($includerelations = true) {
$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.'
);

0 comments on commit dccde5f

Please sign in to comment.
Something went wrong with that request. Please try again.