summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2016-06-27 17:41:56 (GMT)
committerwebchick2016-06-27 17:41:56 (GMT)
commit68649cf8e310c0002a2d4b425e16d2082530177c (patch)
tree1d895b2b68175759ffe9a969ce4c5ce59ce97793
parent0745511bc2673ad3c254ee3e1626ad34b7a18b3d (diff)
Issue #2471010 by pguillard, Arez, Oleksiy, ifrik, yoroy, andypost, alexpott, Bojhan, jbguerraz, brahmjeet789, jaimeguzman, drubb, DuaelFr, lrmeeske, Gábor Hojtsy: Label for Content and User bulk operations does not fit the action
-rw-r--r--core/modules/action/tests/src/Functional/BulkFormTest.php8
-rw-r--r--core/modules/node/src/Tests/Views/BulkFormAccessTest.php6
-rw-r--r--core/modules/node/src/Tests/Views/BulkFormTest.php16
-rw-r--r--core/modules/system/src/Plugin/views/field/BulkForm.php4
-rw-r--r--core/modules/tracker/src/Tests/TrackerTest.php2
-rw-r--r--core/modules/user/src/Tests/UserAdminTest.php4
-rw-r--r--core/modules/user/src/Tests/UserCancelTest.php4
-rw-r--r--core/modules/user/src/Tests/Views/BulkFormAccessTest.php8
-rw-r--r--core/modules/user/src/Tests/Views/BulkFormTest.php10
9 files changed, 31 insertions, 31 deletions
diff --git a/core/modules/action/tests/src/Functional/BulkFormTest.php b/core/modules/action/tests/src/Functional/BulkFormTest.php
index c3a3bc1..7d32b94 100644
--- a/core/modules/action/tests/src/Functional/BulkFormTest.php
+++ b/core/modules/action/tests/src/Functional/BulkFormTest.php
@@ -68,7 +68,7 @@ class BulkFormTest extends BrowserTestBase {
// Set all nodes to sticky and check that.
$edit += array('action' => 'node_make_sticky_action');
- $this->drupalPostForm(NULL, $edit, t('Apply'));
+ $this->drupalPostForm(NULL, $edit, t('Apply to selected items'));
foreach ($nodes as $node) {
$changed_node = $node_storage->load($node->id());
@@ -82,7 +82,7 @@ class BulkFormTest extends BrowserTestBase {
$this->assertTrue($node->isPublished(), 'The node is published.');
$edit = array('node_bulk_form[0]' => TRUE, 'action' => 'node_unpublish_action');
- $this->drupalPostForm(NULL, $edit, t('Apply'));
+ $this->drupalPostForm(NULL, $edit, t('Apply to selected items'));
$this->assertText('Unpublish content was applied to 1 item.');
@@ -123,7 +123,7 @@ class BulkFormTest extends BrowserTestBase {
// Check the default title.
$this->drupalGet('test_bulk_form');
$result = $this->xpath('//label[@for="edit-action"]');
- $this->assertEqual('With selection', $result[0]->getText());
+ $this->assertEqual('Action', $result[0]->getText());
// Setup up a different bulk form title.
$view = Views::getView('test_bulk_form');
@@ -142,7 +142,7 @@ class BulkFormTest extends BrowserTestBase {
$edit["node_bulk_form[$i]"] = TRUE;
}
$edit += array('action' => 'node_delete_action');
- $this->drupalPostForm(NULL, $edit, t('Apply'));
+ $this->drupalPostForm(NULL, $edit, t('Apply to selected items'));
// Make sure we don't show an action message while we are still on the
// confirmation page.
$errors = $this->xpath('//div[contains(@class, "messages--status")]');
diff --git a/core/modules/node/src/Tests/Views/BulkFormAccessTest.php b/core/modules/node/src/Tests/Views/BulkFormAccessTest.php
index 050068b..a9f9ba9 100644
--- a/core/modules/node/src/Tests/Views/BulkFormAccessTest.php
+++ b/core/modules/node/src/Tests/Views/BulkFormAccessTest.php
@@ -87,7 +87,7 @@ class BulkFormAccessTest extends NodeTestBase {
'node_bulk_form[0]' => TRUE,
'action' => 'node_unpublish_action',
);
- $this->drupalPostForm('test-node-bulk-form', $edit, t('Apply'));
+ $this->drupalPostForm('test-node-bulk-form', $edit, t('Apply to selected items'));
$this->assertRaw(SafeMarkup::format('No access to execute %action on the @entity_type_label %entity_label.', [
'%action' => 'Unpublish content',
'@entity_type_label' => 'Content',
@@ -115,7 +115,7 @@ class BulkFormAccessTest extends NodeTestBase {
'node_bulk_form[0]' => TRUE,
'action' => 'node_unpublish_action',
);
- $this->drupalPostForm('test-node-bulk-form', $edit, t('Apply'));
+ $this->drupalPostForm('test-node-bulk-form', $edit, t('Apply to selected items'));
// Re-load the node and check the status.
$node = Node::load($node->id());
$this->assertTrue($node->isPublished(), 'The node is still published.');
@@ -160,7 +160,7 @@ class BulkFormAccessTest extends NodeTestBase {
'node_bulk_form[1]' => TRUE,
'action' => 'node_delete_action',
);
- $this->drupalPostForm('test-node-bulk-form', $edit, t('Apply'));
+ $this->drupalPostForm('test-node-bulk-form', $edit, t('Apply to selected items'));
$this->drupalPostForm(NULL, array(), t('Delete'));
// Ensure the private node still exists.
$private_node = Node::load($private_node->id());
diff --git a/core/modules/node/src/Tests/Views/BulkFormTest.php b/core/modules/node/src/Tests/Views/BulkFormTest.php
index b2e3ae4..677c9d8 100644
--- a/core/modules/node/src/Tests/Views/BulkFormTest.php
+++ b/core/modules/node/src/Tests/Views/BulkFormTest.php
@@ -105,7 +105,7 @@ class BulkFormTest extends NodeTestBase {
'node_bulk_form[0]' => TRUE,
'action' => 'node_unpublish_action',
);
- $this->drupalPostForm(NULL, $edit, t('Apply'));
+ $this->drupalPostForm(NULL, $edit, t('Apply to selected items'));
$node = $this->loadNode($node->id());
$this->assertFalse($node->isPublished(), 'Node has been unpublished');
$this->assertTrue($node->getTranslation('en-gb')->isPublished(), 'Node translation has not been unpublished');
@@ -116,7 +116,7 @@ class BulkFormTest extends NodeTestBase {
'node_bulk_form[0]' => TRUE,
'action' => 'node_publish_action',
);
- $this->drupalPostForm(NULL, $edit, t('Apply'));
+ $this->drupalPostForm(NULL, $edit, t('Apply to selected items'));
$node = $this->loadNode($node->id());
$this->assertTrue($node->isPublished(), 'Node has been published again');
@@ -128,7 +128,7 @@ class BulkFormTest extends NodeTestBase {
'node_bulk_form[0]' => TRUE,
'action' => 'node_make_sticky_action',
);
- $this->drupalPostForm(NULL, $edit, t('Apply'));
+ $this->drupalPostForm(NULL, $edit, t('Apply to selected items'));
$node = $this->loadNode($node->id());
$this->assertTrue($node->isSticky(), 'Node has been made sticky');
$this->assertFalse($node->getTranslation('en-gb')->isSticky(), 'Node translation has not been made sticky');
@@ -139,7 +139,7 @@ class BulkFormTest extends NodeTestBase {
'node_bulk_form[0]' => TRUE,
'action' => 'node_make_unsticky_action',
);
- $this->drupalPostForm(NULL, $edit, t('Apply'));
+ $this->drupalPostForm(NULL, $edit, t('Apply to selected items'));
$node = $this->loadNode($node->id());
$this->assertFalse($node->isSticky(), 'Node is not sticky anymore');
@@ -151,7 +151,7 @@ class BulkFormTest extends NodeTestBase {
'node_bulk_form[0]' => TRUE,
'action' => 'node_promote_action',
);
- $this->drupalPostForm(NULL, $edit, t('Apply'));
+ $this->drupalPostForm(NULL, $edit, t('Apply to selected items'));
$node = $this->loadNode($node->id());
$this->assertTrue($node->isPromoted(), 'Node has been promoted to the front page');
$this->assertFalse($node->getTranslation('en-gb')->isPromoted(), 'Node translation has not been promoted to the front page');
@@ -162,7 +162,7 @@ class BulkFormTest extends NodeTestBase {
'node_bulk_form[0]' => TRUE,
'action' => 'node_unpromote_action',
);
- $this->drupalPostForm(NULL, $edit, t('Apply'));
+ $this->drupalPostForm(NULL, $edit, t('Apply to selected items'));
$node = $this->loadNode($node->id());
$this->assertFalse($node->isPromoted(), 'Node has been demoted');
@@ -185,7 +185,7 @@ class BulkFormTest extends NodeTestBase {
'node_bulk_form[9]' => FALSE, // Node 5, British English, untranslated.
'action' => 'node_unpublish_action',
);
- $this->drupalPostForm(NULL, $edit, t('Apply'));
+ $this->drupalPostForm(NULL, $edit, t('Apply to selected items'));
$node = $this->loadNode(1);
$this->assertFalse($node->getTranslation('en')->isPublished(), '1: English translation has been unpublished');
$this->assertFalse($node->getTranslation('en-gb')->isPublished(), '1: British English translation has been unpublished');
@@ -226,7 +226,7 @@ class BulkFormTest extends NodeTestBase {
'node_bulk_form[9]' => FALSE, // Node 5, British English, untranslated.
'action' => 'node_delete_action',
);
- $this->drupalPostForm(NULL, $edit, t('Apply'));
+ $this->drupalPostForm(NULL, $edit, t('Apply to selected items'));
$label = $this->loadNode(1)->label();
$this->assertText("$label (Original translation) - The following content translations will be deleted:");
diff --git a/core/modules/system/src/Plugin/views/field/BulkForm.php b/core/modules/system/src/Plugin/views/field/BulkForm.php
index d5842bc..f0f83a4 100644
--- a/core/modules/system/src/Plugin/views/field/BulkForm.php
+++ b/core/modules/system/src/Plugin/views/field/BulkForm.php
@@ -162,7 +162,7 @@ class BulkForm extends FieldPluginBase implements CacheableDependencyInterface {
*/
protected function defineOptions() {
$options = parent::defineOptions();
- $options['action_title'] = array('default' => $this->t('With selection'));
+ $options['action_title'] = array('default' => $this->t('Action'));
$options['include_exclude'] = array(
'default' => 'exclude',
);
@@ -271,7 +271,7 @@ class BulkForm extends FieldPluginBase implements CacheableDependencyInterface {
}
// Replace the form submit button label.
- $form['actions']['submit']['#value'] = $this->t('Apply');
+ $form['actions']['submit']['#value'] = $this->t('Apply to selected items');
// Ensure a consistent container for filters/operations in the view header.
$form['header'] = array(
diff --git a/core/modules/tracker/src/Tests/TrackerTest.php b/core/modules/tracker/src/Tests/TrackerTest.php
index fa533c1..a927e89 100644
--- a/core/modules/tracker/src/Tests/TrackerTest.php
+++ b/core/modules/tracker/src/Tests/TrackerTest.php
@@ -412,7 +412,7 @@ class TrackerTest extends WebTestBase {
'action' => 'node_unpublish_action',
'node_bulk_form[0]' => $node->id(),
);
- $this->drupalPostForm('admin/content', $edit, t('Apply'));
+ $this->drupalPostForm('admin/content', $edit, t('Apply to selected items'));
$this->drupalGet('activity');
$this->assertText(t('No content available.'), 'A node is displayed on the tracker listing pages.');
diff --git a/core/modules/user/src/Tests/UserAdminTest.php b/core/modules/user/src/Tests/UserAdminTest.php
index 6569ad2..60fd56b 100644
--- a/core/modules/user/src/Tests/UserAdminTest.php
+++ b/core/modules/user/src/Tests/UserAdminTest.php
@@ -100,7 +100,7 @@ class UserAdminTest extends WebTestBase {
$config
->set('notify.status_blocked', TRUE)
->save();
- $this->drupalPostForm('admin/people', $edit, t('Apply'), array(
+ $this->drupalPostForm('admin/people', $edit, t('Apply to selected items'), array(
// Sort the table by username so that we know reliably which user will be
// targeted with the blocking action.
'query' => array('order' => 'name', 'sort' => 'asc')
@@ -121,7 +121,7 @@ class UserAdminTest extends WebTestBase {
$editunblock = array();
$editunblock['action'] = 'user_unblock_user_action';
$editunblock['user_bulk_form[4]'] = TRUE;
- $this->drupalPostForm('admin/people', $editunblock, t('Apply'), array(
+ $this->drupalPostForm('admin/people', $editunblock, t('Apply to selected items'), array(
// Sort the table by username so that we know reliably which user will be
// targeted with the blocking action.
'query' => array('order' => 'name', 'sort' => 'asc')
diff --git a/core/modules/user/src/Tests/UserCancelTest.php b/core/modules/user/src/Tests/UserCancelTest.php
index fe21516..4ce4d91 100644
--- a/core/modules/user/src/Tests/UserCancelTest.php
+++ b/core/modules/user/src/Tests/UserCancelTest.php
@@ -124,7 +124,7 @@ class UserCancelTest extends WebTestBase {
'action' => 'user_cancel_user_action',
'user_bulk_form[0]' => TRUE,
);
- $this->drupalPostForm('admin/people', $edit, t('Apply'));
+ $this->drupalPostForm('admin/people', $edit, t('Apply to selected items'));
// Verify that uid 1's account was not cancelled.
$user_storage->resetCache(array(1));
@@ -567,7 +567,7 @@ class UserCancelTest extends WebTestBase {
for ($i = 0; $i <= 4; $i++) {
$edit['user_bulk_form[' . $i . ']'] = TRUE;
}
- $this->drupalPostForm('admin/people', $edit, t('Apply'));
+ $this->drupalPostForm('admin/people', $edit, t('Apply to selected items'));
$this->assertText(t('Are you sure you want to cancel these user accounts?'), 'Confirmation form to cancel accounts displayed.');
$this->assertText(t('When cancelling these accounts'), 'Allows to select account cancellation method.');
$this->assertText(t('Require email confirmation to cancel account'), 'Allows to send confirmation mail.');
diff --git a/core/modules/user/src/Tests/Views/BulkFormAccessTest.php b/core/modules/user/src/Tests/Views/BulkFormAccessTest.php
index 47d2833..3aa5f93 100644
--- a/core/modules/user/src/Tests/Views/BulkFormAccessTest.php
+++ b/core/modules/user/src/Tests/Views/BulkFormAccessTest.php
@@ -50,7 +50,7 @@ class BulkFormAccessTest extends UserTestBase {
'user_bulk_form[' . ($no_edit_user->id() - 1) . ']' => TRUE,
'action' => 'user_block_user_action',
);
- $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply'));
+ $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply to selected items'));
$this->assertResponse(200);
$this->assertRaw(SafeMarkup::format('No access to execute %action on the @entity_type_label %entity_label.', [
@@ -71,7 +71,7 @@ class BulkFormAccessTest extends UserTestBase {
'user_bulk_form[' . ($normal_user->id() - 1) . ']' => TRUE,
'action' => 'user_block_user_action',
);
- $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply'));
+ $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply to selected items'));
$normal_user = User::load($normal_user->id());
$this->assertTrue($normal_user->isBlocked(), 'The user is blocked.');
@@ -83,7 +83,7 @@ class BulkFormAccessTest extends UserTestBase {
'user_bulk_form[' . ($normal_user->id() - 1) . ']' => TRUE,
'action' => 'user_unblock_user_action',
);
- $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply'));
+ $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply to selected items'));
// Re-load the normal user and ensure it is still blocked.
$normal_user = User::load($normal_user->id());
@@ -114,7 +114,7 @@ class BulkFormAccessTest extends UserTestBase {
'user_bulk_form[' . ($account2->id() - 1) . ']' => TRUE,
'action' => 'user_cancel_user_action',
);
- $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply'));
+ $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply to selected items'));
$edit = array(
'user_cancel_method' => 'user_cancel_delete',
);
diff --git a/core/modules/user/src/Tests/Views/BulkFormTest.php b/core/modules/user/src/Tests/Views/BulkFormTest.php
index c617c17..00bdc82 100644
--- a/core/modules/user/src/Tests/Views/BulkFormTest.php
+++ b/core/modules/user/src/Tests/Views/BulkFormTest.php
@@ -46,7 +46,7 @@ class BulkFormTest extends UserTestBase {
$edit = array(
'action' => 'user_block_user_action',
);
- $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply'));
+ $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply to selected items'));
$this->assertText(t('No users selected.'));
// Assign a role to a user.
@@ -60,7 +60,7 @@ class BulkFormTest extends UserTestBase {
'user_bulk_form[1]' => TRUE,
'action' => 'user_add_role_action.' . $role,
);
- $this->drupalPostForm(NULL, $edit, t('Apply'));
+ $this->drupalPostForm(NULL, $edit, t('Apply to selected items'));
// Re-load the user and check their roles.
$user_storage->resetCache(array($account->id()));
$account = $user_storage->load($account->id());
@@ -70,7 +70,7 @@ class BulkFormTest extends UserTestBase {
'user_bulk_form[1]' => TRUE,
'action' => 'user_remove_role_action.' . $role,
);
- $this->drupalPostForm(NULL, $edit, t('Apply'));
+ $this->drupalPostForm(NULL, $edit, t('Apply to selected items'));
// Re-load the user and check their roles.
$user_storage->resetCache(array($account->id()));
$account = $user_storage->load($account->id());
@@ -83,7 +83,7 @@ class BulkFormTest extends UserTestBase {
'user_bulk_form[1]' => TRUE,
'action' => 'user_block_user_action',
);
- $this->drupalPostForm(NULL, $edit, t('Apply'));
+ $this->drupalPostForm(NULL, $edit, t('Apply to selected items'));
// Re-load the user and check their status.
$user_storage->resetCache(array($account->id()));
$account = $user_storage->load($account->id());
@@ -104,7 +104,7 @@ class BulkFormTest extends UserTestBase {
'user_bulk_form[0]' => TRUE,
'action' => 'user_block_user_action',
);
- $this->drupalPostForm(NULL, $edit, t('Apply'));
+ $this->drupalPostForm(NULL, $edit, t('Apply to selected items'));
$anonymous_account = $user_storage->load(0);
$this->assertTrue($anonymous_account->isBlocked(), 'Ensure the anonymous user got blocked.');