diff --git a/plugins/views_plugin_display_block.inc b/plugins/views_plugin_display_block.inc index 45acd08459720eb5a535ac8c7f5854de8df53826..20331007e1a36d3bb134098338e6ab7771c9f364 100644 --- a/plugins/views_plugin_display_block.inc +++ b/plugins/views_plugin_display_block.inc @@ -125,7 +125,6 @@ function get_cache_type() { * Provide the default form for setting options. */ function options_form(&$form, &$form_state) { - parent::options_form($form, $form_state); // It is very important to call the parent function here: parent::options_form($form, $form_state); @@ -148,6 +147,14 @@ function options_form(&$form, &$form_state) { '#default_value' => $this->get_cache_type(), ); break; + case 'exposed_form_options': + $this->view->init_handlers(); + if (!$this->uses_exposed() && parent::uses_exposed()) { + $form['exposed_form_options']['warning'] = array( + '#weight' => -10, + '#markup' => '<div class="messages warning">' . t('Exposed filters in block displays require "Use AJAX" to be set to work correctly.') . '</div>', + ); + } } } @@ -179,10 +186,6 @@ function uses_exposed() { if ($this->use_ajax()) { return parent::uses_exposed(); } - //Warn user that for blocks, exposed filters only work with AJAX. - if (parent::uses_exposed()) { - drupal_set_message(t('Exposed filters in block displays require "Use AJAX" to be set to work correctly.'),'error',FALSE); - } return FALSE; }