diff --git a/src/Form/PollViewForm.php b/src/Form/PollViewForm.php index 662183c..02623f2 100644 --- a/src/Form/PollViewForm.php +++ b/src/Form/PollViewForm.php @@ -75,9 +75,8 @@ public function buildForm(array $form, FormStateInterface $form_state, Request $ $form['results'] = $this->showPollResults($this->poll, $view_mode); - // For all view modes except full and block (as block displays it as the - // block title), display the question. - if ($view_mode != 'full' && $view_mode != 'block') { + // For all view modes except full, display the question. + if ($view_mode != 'full') { $form['results']['#show_question'] = TRUE; } } @@ -98,9 +97,8 @@ public function buildForm(array $form, FormStateInterface $form_state, Request $ // results when the form is rebuilt. $form_state->set('show_results', FALSE); - // For all view modes except full and block (as block displays it as the - // block title), display the question. - if ($view_mode != 'full' && $view_mode != 'block') { + // For all view modes except full, display the question. + if ($view_mode != 'full') { $form['#show_question'] = TRUE; } diff --git a/src/Plugin/Block/PollRecentBlock.php b/src/Plugin/Block/PollRecentBlock.php index 3dfae86..60582c6 100644 --- a/src/Plugin/Block/PollRecentBlock.php +++ b/src/Plugin/Block/PollRecentBlock.php @@ -88,7 +88,6 @@ public function build() { // } // @todo: new view mode using ajax $build = $this->entityTypeManager->getViewBuilder('poll')->view($poll, 'block'); - $build['#title'] = $poll->label(); } return $build;