diff --git a/core/modules/forum/src/Tests/ForumTest.php b/core/modules/forum/src/Tests/ForumTest.php index 974e400..39c8b43 100644 --- a/core/modules/forum/src/Tests/ForumTest.php +++ b/core/modules/forum/src/Tests/ForumTest.php @@ -307,13 +307,13 @@ private function doAdminTests($user) { $this->assertLink('Add forum'); $this->assertLink('Add container'); $this->clickLink('edit container'); - $this->assertRaw('Edit container', 'Followed the link to edit the container'); + $this->assertRaw('Edit ' . $this->forumContainer['name'], 'Followed the link to edit the container'); // Create forum inside the forum container. $this->forum = $this->createForum('forum', $this->forumContainer['tid']); // Verify the "edit forum" link exists and functions correctly. $this->drupalGet('admin/structure/forum'); $this->clickLink('edit forum'); - $this->assertRaw('Edit forum', 'Followed the link to edit the forum'); + $this->assertRaw($this->forum['name'], 'Followed the link to edit the forum'); // Navigate back to forum structure page. $this->drupalGet('admin/structure/forum'); // Create second forum in container, destined to be deleted below. diff --git a/core/modules/taxonomy/src/TermForm.php b/core/modules/taxonomy/src/TermForm.php index 9da0993..d21a3b1 100644 --- a/core/modules/taxonomy/src/TermForm.php +++ b/core/modules/taxonomy/src/TermForm.php @@ -20,6 +20,14 @@ class TermForm extends ContentEntityForm { */ public function form(array $form, FormStateInterface $form_state) { $term = $this->entity; + + if ($term->isNew()) { + $form['#title'] = $this->t('Add Term'); + } + else { + $form['#title'] = $this->t('Edit ' . $term->label()); + } + $vocab_storage = $this->entityManager->getStorage('taxonomy_vocabulary'); $taxonomy_storage = $this->entityManager->getStorage('taxonomy_term'); $vocabulary = $vocab_storage->load($term->bundle()); diff --git a/core/modules/taxonomy/src/VocabularyForm.php b/core/modules/taxonomy/src/VocabularyForm.php index e175af7..8b1b755 100644 --- a/core/modules/taxonomy/src/VocabularyForm.php +++ b/core/modules/taxonomy/src/VocabularyForm.php @@ -54,7 +54,7 @@ public function form(array $form, FormStateInterface $form_state) { $form['#title'] = $this->t('Add vocabulary'); } else { - $form['#title'] = $this->t('Edit vocabulary'); + $form['#title'] = $this->t('Edit ' . $vocabulary->label()); } $form['name'] = array(