diff --git a/core/modules/forum/src/Tests/ForumTest.php b/core/modules/forum/src/Tests/ForumTest.php index 1327714..e605198 100644 --- a/core/modules/forum/src/Tests/ForumTest.php +++ b/core/modules/forum/src/Tests/ForumTest.php @@ -301,13 +301,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 17ac5c2..252fa7c 100644 --- a/core/modules/taxonomy/src/TermForm.php +++ b/core/modules/taxonomy/src/TermForm.php @@ -15,6 +15,10 @@ class TermForm extends ContentEntityForm { */ public function form(array $form, FormStateInterface $form_state) { $term = $this->entity; + if (!$term->isNew()) { + $form['#title'] = $this->t('Edit @name', array('@name' => $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 1868ddc..dcab503 100644 --- a/core/modules/taxonomy/src/VocabularyForm.php +++ b/core/modules/taxonomy/src/VocabularyForm.php @@ -49,7 +49,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 @name', array('@name' => $vocabulary->label())); } $form['name'] = array(