Commit 978b0269 authored by xjm's avatar xjm
Browse files

Issue #2752915 by mohit_aghera, davic, Haza, pashupathi nath gajawada,...

Issue #2752915 by mohit_aghera, davic, Haza, pashupathi nath gajawada, chr.fritsch, ifrik, webchick, j2r: Rename "Add page" to "Add search page"
parent faef09ea
......@@ -24,7 +24,7 @@ public function buildForm(array $form, FormStateInterface $form_state, $search_p
*/
protected function actions(array $form, FormStateInterface $form_state) {
$actions = parent::actions($form, $form_state);
$actions['submit']['#value'] = $this->t('Add search page');
$actions['submit']['#value'] = $this->t('Save');
return $actions;
}
......
......@@ -269,7 +269,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
);
$form['search_pages']['add_page']['add_search_submit'] = array(
'#type' => 'submit',
'#value' => $this->t('Add new page'),
'#value' => $this->t('Add search page'),
'#validate' => array('::validateAddSearchPage'),
'#submit' => array('::submitAddSearchPage'),
'#limit_validation_errors' => array(array('search_type')),
......
......@@ -237,26 +237,26 @@ public function testMultipleSearchPages() {
// Add a search page.
$edit = array();
$edit['search_type'] = 'search_extra_type_search';
$this->drupalPostForm(NULL, $edit, t('Add new page'));
$this->drupalPostForm(NULL, $edit, t('Add search page'));
$this->assertTitle('Add new search page | Drupal');
$first = array();
$first['label'] = $this->randomString();
$first_id = $first['id'] = strtolower($this->randomMachineName(8));
$first['path'] = strtolower($this->randomMachineName(8));
$this->drupalPostForm(NULL, $first, t('Add search page'));
$this->drupalPostForm(NULL, $first, t('Save'));
$this->assertDefaultSearch($first_id, 'The default page matches the only search page.');
$this->assertRaw(t('The %label search page has been added.', array('%label' => $first['label'])));
// Attempt to add a search page with an existing path.
$edit = array();
$edit['search_type'] = 'search_extra_type_search';
$this->drupalPostForm(NULL, $edit, t('Add new page'));
$this->drupalPostForm(NULL, $edit, t('Add search page'));
$edit = array();
$edit['label'] = $this->randomString();
$edit['id'] = strtolower($this->randomMachineName(8));
$edit['path'] = $first['path'];
$this->drupalPostForm(NULL, $edit, t('Add search page'));
$this->drupalPostForm(NULL, $edit, t('Save'));
$this->assertText(t('The search page path must be unique.'));
// Add a second search page.
......@@ -264,7 +264,7 @@ public function testMultipleSearchPages() {
$second['label'] = $this->randomString();
$second_id = $second['id'] = strtolower($this->randomMachineName(8));
$second['path'] = strtolower($this->randomMachineName(8));
$this->drupalPostForm(NULL, $second, t('Add search page'));
$this->drupalPostForm(NULL, $second, t('Save'));
$this->assertDefaultSearch($first_id, 'The default page matches the only search page.');
// Ensure both search pages have their tabs displayed.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment