Commit ce7cf174 authored by alexpott's avatar alexpott

Issue #2561115 by michaellenahan, Lendude, cilefen, lomasr, amit.drupal, Gábor...

Issue #2561115 by michaellenahan, Lendude, cilefen, lomasr, amit.drupal, Gábor Hojtsy, dawehner, ifrik: Use 'Filter' for exposed filter button text in new views and new installations (instead of 'Apply')
parent 44a9491c
......@@ -36,7 +36,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -40,7 +40,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -35,7 +35,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -35,7 +35,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -39,7 +39,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -42,7 +42,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -38,7 +38,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -38,7 +38,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -35,7 +35,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -39,7 +39,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -38,7 +38,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -36,7 +36,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -39,7 +39,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -35,7 +35,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -40,7 +40,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -40,7 +40,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -63,7 +63,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -38,7 +38,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -35,7 +35,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -40,7 +40,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -39,7 +39,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -39,7 +39,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -39,7 +39,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -40,7 +40,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -35,7 +35,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -35,7 +35,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -35,7 +35,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -35,7 +35,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -35,7 +35,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -40,7 +40,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -38,7 +38,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -38,7 +38,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -38,7 +38,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -38,7 +38,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -38,7 +38,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -38,7 +38,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -36,7 +36,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -36,7 +36,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -35,7 +35,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -35,7 +35,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
......
......@@ -107,7 +107,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
// Prevent from showing up in \Drupal::request()->query.
'#name' => '',
'#type' => 'submit',
'#value' => $this->t('Apply'),
'#value' => $this->t('Filter'),
'#id' => Html::getUniqueId('edit-submit-' . $view->storage->id()),
);
......
......@@ -26,7 +26,7 @@ abstract class ExposedFormPluginBase extends PluginBase implements CacheableDepe
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['submit_button'] = array('default' => $this->t('Apply'));
$options['submit_button'] = array('default' => $this->t('Filter'));
$options['reset_button'] = array('default' => FALSE);
$options['reset_button_label'] = array('default' => $this->t('Reset'));
$options['exposed_sorts_label'] = array('default' => $this->t('Sort by'));
......
......@@ -48,10 +48,10 @@ protected function setUp() {
* Tests the submit button.
*/
public function testSubmitButton() {
// Test the submit button value defaults to 'Apply'.
// Test the submit button value defaults to 'Filter'.
$this->drupalGet('test_exposed_form_buttons');
$this->assertResponse(200);
$this->helperButtonHasLabel('edit-submit-test-exposed-form-buttons', t('Apply'));
$this->helperButtonHasLabel('edit-submit-test-exposed-form-buttons', t('Filter'));
// Rename the label of the submit button.
$view = Views::getView('test_exposed_form_buttons');
......@@ -66,7 +66,7 @@ public function testSubmitButton() {
$this->drupalGet('test_exposed_form_buttons');
$this->helperButtonHasLabel('edit-submit-test-exposed-form-buttons', $expected_label);
// Make sure an empty label uses the default 'Apply' button value too.
// Make sure an empty label uses the default 'Filter' button value too.
$view = Views::getView('test_exposed_form_buttons');
$view->setDisplay();
......@@ -75,9 +75,9 @@ public function testSubmitButton() {
$view->display_handler->setOption('exposed_form', $exposed_form);
$view->save();
// Make sure the submit button label shows 'Apply'.
// Make sure the submit button label shows 'Filter'.
$this->drupalGet('test_exposed_form_buttons');
$this->helperButtonHasLabel('edit-submit-test-exposed-form-buttons', t('Apply'));
$this->helperButtonHasLabel('edit-submit-test-exposed-form-buttons', t('Filter'));
}
/**
......@@ -294,7 +294,7 @@ public function testInputRequired() {
$this->drupalGet('test_exposed_form_buttons');
$this->assertResponse(200);
$this->helperButtonHasLabel('edit-submit-test-exposed-form-buttons', t('Apply'));
$this->helperButtonHasLabel('edit-submit-test-exposed-form-buttons', t('Filter'));
// Ensure that no results are displayed.
$rows = $this->xpath("//div[contains(@class, 'views-row')]");
......
......@@ -37,7 +37,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Apply
submit_button: Filter