Add default action from batch actions

This commit is contained in:
scott1702 2016-01-22 16:02:27 +13:00
parent bc2a4dd652
commit e4222d8186
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -329,7 +329,7 @@ en:
LeftAndMain:
CANT_REORGANISE: 'You do not have permission to alter Top level pages. Your change was not saved.'
DELETED: Deleted.
DropdownBatchActionsDefault: Actions
DropdownBatchActionsDefault: 'Choose an action...'
HELP: Help
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.'