Issue #2861022: ForumForm and ContainerForm forms are rendered using wrong texts
parent
7b55855e70
commit
15ae76d090
|
@ -20,9 +20,8 @@ class ContainerForm extends ForumForm {
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function form(array $form, FormStateInterface $form_state) {
|
public function form(array $form, FormStateInterface $form_state) {
|
||||||
$taxonomy_term = $this->entity;
|
|
||||||
// Build the bulk of the form from the parent forum form.
|
// Build the bulk of the form from the parent forum form.
|
||||||
$form = parent::form($form, $form_state, $taxonomy_term);
|
$form = parent::form($form, $form_state);
|
||||||
|
|
||||||
// Set the title and description of the name field.
|
// Set the title and description of the name field.
|
||||||
$form['name']['#title'] = $this->t('Container name');
|
$form['name']['#title'] = $this->t('Container name');
|
||||||
|
|
|
@ -29,9 +29,8 @@ class ForumForm extends TermForm {
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function form(array $form, FormStateInterface $form_state) {
|
public function form(array $form, FormStateInterface $form_state) {
|
||||||
$taxonomy_term = $this->entity;
|
// Build the bulk of the form from the parent form.
|
||||||
// Build the bulk of the form from the parent taxonomy term form.
|
$form = parent::form($form, $form_state);
|
||||||
$form = parent::form($form, $form_state, $taxonomy_term);
|
|
||||||
|
|
||||||
// Set the title and description of the name field.
|
// Set the title and description of the name field.
|
||||||
$form['name']['#title'] = $this->t('Forum name');
|
$form['name']['#title'] = $this->t('Forum name');
|
||||||
|
@ -48,7 +47,7 @@ class ForumForm extends TermForm {
|
||||||
|
|
||||||
// Our parent field is different to the taxonomy term.
|
// Our parent field is different to the taxonomy term.
|
||||||
$form['parent']['#tree'] = TRUE;
|
$form['parent']['#tree'] = TRUE;
|
||||||
$form['parent'][0] = $this->forumParentSelect($taxonomy_term->id(), $this->t('Parent'));
|
$form['parent'][0] = $this->forumParentSelect($this->entity->id(), $this->t('Parent'));
|
||||||
|
|
||||||
$form['#theme_wrappers'] = ['form__forum'];
|
$form['#theme_wrappers'] = ['form__forum'];
|
||||||
$this->forumFormType = $this->t('forum');
|
$this->forumFormType = $this->t('forum');
|
||||||
|
|
Loading…
Reference in New Issue