Merge pull request #4969 from scott1702/batch-actions

Add default action for batch actions
This commit is contained in:
Damian Mooyman 2016-01-22 16:20:06 +13:00
commit b2bd3ccca9
2 changed files with 3 additions and 3 deletions

View File

@ -1409,7 +1409,7 @@ class LeftAndMain extends Controller implements PermissionProvider {
*/ */
public function BatchActionsForm() { public function BatchActionsForm() {
$actions = $this->batchactions()->batchActionList(); $actions = $this->batchactions()->batchActionList();
$actionsMap = array(); $actionsMap = array('-1' => _t('LeftAndMain.DropdownBatchActionsDefault', 'Choose an action...')); // Placeholder action
foreach($actions as $action) { foreach($actions as $action) {
$actionsMap[$action->Link] = $action->Title; $actionsMap[$action->Link] = $action->Title;
} }
@ -1425,7 +1425,7 @@ class LeftAndMain extends Controller implements PermissionProvider {
$actionsMap $actionsMap
) )
->setAttribute('autocomplete', 'off') ->setAttribute('autocomplete', 'off')
->setAttribute('data-placeholder', _t('LeftAndMain.DropdownBatchActionsDefault', 'Actions')) ->setAttribute('data-placeholder', _t('LeftAndMain.DropdownBatchActionsDefault', 'Choose an action...'))
), ),
new FieldList( new FieldList(
// TODO i18n // TODO i18n

View File

@ -329,7 +329,7 @@ en:
LeftAndMain: LeftAndMain:
CANT_REORGANISE: 'You do not have permission to alter Top level pages. Your change was not saved.' CANT_REORGANISE: 'You do not have permission to alter Top level pages. Your change was not saved.'
DELETED: Deleted. DELETED: Deleted.
DropdownBatchActionsDefault: Actions DropdownBatchActionsDefault: 'Choose an action...'
HELP: Help HELP: Help
PAGETYPE: 'Page type' PAGETYPE: 'Page type'
PERMAGAIN: 'You have been logged out of the CMS. If you would like to log in again, enter a username and password below.' PERMAGAIN: 'You have been logged out of the CMS. If you would like to log in again, enter a username and password below.'