Commit c26700ad authored by dawehner's avatar dawehner Committed by tim.plunkett
Browse files

Issue #1578028 by dawehner: Change the way the exposed form in block AJAX message is done.

parent f7ba3721
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment