Permalink
Browse files

Added placeholder text to group listboxes

  • Loading branch information...
1 parent a8478d2 commit 5b2cc197049c363c2d51e936b9b07dcc0868f290 @chillu chillu committed Dec 15, 2012
Showing with 30 additions and 5 deletions.
  1. +18 −3 code/model/SiteConfig.php
  2. +12 −2 code/model/SiteTree.php
@@ -58,13 +58,28 @@ public function getCMSFields() {
$tabAccess = new Tab('Access',
$viewersOptionsField = new OptionsetField("CanViewType", _t('SiteConfig.VIEWHEADER', "Who can view pages on this site?")),
$viewerGroupsField = ListboxField::create("ViewerGroups", _t('SiteTree.VIEWERGROUPS', "Viewer Groups"))
- ->setMultiple(true)->setSource($groupsMap),
+ ->setMultiple(true)
+ ->setSource($groupsMap)
+ ->setAttribute(
+ 'data-placeholder',
+ _t('SiteTree.GroupPlaceholder', 'Click to select group')
+ ),
$editorsOptionsField = new OptionsetField("CanEditType", _t('SiteConfig.EDITHEADER', "Who can edit pages on this site?")),
$editorGroupsField = ListboxField::create("EditorGroups", _t('SiteTree.EDITORGROUPS', "Editor Groups"))
- ->setMultiple(true)->setSource($groupsMap),
+ ->setMultiple(true)
+ ->setSource($groupsMap)
+ ->setAttribute(
+ 'data-placeholder',
+ _t('SiteTree.GroupPlaceholder', 'Click to select group')
+ ),
$topLevelCreatorsOptionsField = new OptionsetField("CanCreateTopLevelType", _t('SiteConfig.TOPLEVELCREATE', "Who can create pages in the root of the site?")),
$topLevelCreatorsGroupsField = ListboxField::create("CreateTopLevelGroups", _t('SiteTree.TOPLEVELCREATORGROUPS', "Top level creators"))
- ->setMultiple(true)->setSource($groupsMap)
+ ->setMultiple(true)
+ ->setSource($groupsMap)
+ ->setAttribute(
+ 'data-placeholder',
+ _t('SiteTree.GroupPlaceholder', 'Click to select group')
+ )
)
),
new HiddenField('ID')
@@ -1931,13 +1931,23 @@ public function getSettingsFields() {
_t('SiteTree.ACCESSHEADER', "Who can view this page?")
),
$viewerGroupsField = ListboxField::create("ViewerGroups", _t('SiteTree.VIEWERGROUPS', "Viewer Groups"))
- ->setMultiple(true)->setSource($groupsMap),
+ ->setMultiple(true)
+ ->setSource($groupsMap)
+ ->setAttribute(
+ 'data-placeholder',
+ _t('SiteTree.GroupPlaceholder', 'Click to select group')
+ ),
$editorsOptionsField = new OptionsetField(
"CanEditType",
_t('SiteTree.EDITHEADER', "Who can edit this page?")
),
$editorGroupsField = ListboxField::create("EditorGroups", _t('SiteTree.EDITORGROUPS', "Editor Groups"))
- ->setMultiple(true)->setSource($groupsMap)
+ ->setMultiple(true)
+ ->setSource($groupsMap)
+ ->setAttribute(
+ 'data-placeholder',
+ _t('SiteTree.GroupPlaceholder', 'Click to select group')
+ )
)
)
);

0 comments on commit 5b2cc19

Please sign in to comment.