mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
ENHANCEMENT When loading CMS, ensure that "Parent page" tree dropdown is
either hidden or shown depending on initial "Page location" state
This commit is contained in:
parent
677623c11f
commit
614f307a37
@ -1899,7 +1899,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
$parentTypeSelector = new CompositeField(
|
||||
new OptionsetField("ParentType", _t("SiteTree.PAGELOCATION", "Page location"), array(
|
||||
"root" => _t("SiteTree.PARENTTYPE_ROOT", "Top-level page"),
|
||||
"subpage" => _t("SiteTree.PARENTTYPE_SUBPAGE", "Sub-page underneath a parent page (choose below)"),
|
||||
"subpage" => _t("SiteTree.PARENTTYPE_SUBPAGE", "Sub-page underneath a parent page"),
|
||||
)),
|
||||
$parentIDField = new TreeDropdownField("ParentID", $this->fieldLabel('ParentID'), 'SiteTree', 'ID', 'MenuTitle')
|
||||
),
|
||||
|
@ -275,7 +275,10 @@
|
||||
* radio button is selected
|
||||
*/
|
||||
$('.cms-edit-form.CMSPageSettingsController input[name="ParentType"]:checked').entwine({
|
||||
|
||||
onmatch: function() {
|
||||
this.onclick();
|
||||
this._super();
|
||||
},
|
||||
/**
|
||||
* Function: onclick
|
||||
*
|
||||
@ -286,7 +289,7 @@
|
||||
var parentTreeDropDown = $('.cms-edit-form.CMSPageSettingsController #ParentID');
|
||||
|
||||
if (e.target.id == 'Form_EditForm_ParentType_root') parentTreeDropDown.slideUp();
|
||||
else parentTreeDropDown.slideDown();
|
||||
else parentTreeDropDown.slideDown();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -338,7 +338,7 @@ en:
|
||||
PARENTID: "Parent page"
|
||||
PARENTTYPE: "Page location"
|
||||
PARENTTYPE_ROOT: "Top-level page"
|
||||
PARENTTYPE_SUBPAGE: "Sub-page underneath a parent page (choose below)"
|
||||
PARENTTYPE_SUBPAGE: "Sub-page underneath a parent page"
|
||||
PERMISSION_GRANTACCESS_DESCRIPTION: "Manage access rights for content"
|
||||
PERMISSION_GRANTACCESS_HELP: "Allow setting of page-specific access restrictions in the \"Pages\" section."
|
||||
# Pural name of the object, used in dropdowns and to generally identify a collection of this object in the interface
|
||||
|
Loading…
Reference in New Issue
Block a user