Commit e06da1d7 authored by David_Rothstein's avatar David_Rothstein

Issue #1116326 by s_leu, yannickoo, dawehner, nod_, pwolanin, David_Rothstein,...

Issue #1116326 by s_leu, yannickoo, dawehner, nod_, pwolanin, David_Rothstein, ksenzee, realityloop, miro_dietiker, broeker, mariagwyn, Christian DeLoach: Support admin overlay in exposed forms
parent 5009eff2
......@@ -47,6 +47,9 @@ Drupal 7.50, xxxx-xx-xx (development version)
broke contributed modules that override the "admin/people" page.
- Fixed a bug which caused ip_address() to return nothing when the client IP
address and proxy IP address are the same.
- Made method="get" forms work inside the administrative overlay. The fix adds
a new hidden field to these forms when they appear inside the overlay (minor
data structure change).
Drupal 7.44, 2016-06-15
-----------------------
......
......@@ -78,6 +78,20 @@ function overlay_theme() {
);
}
/**
* Implements hook_form_alter().
*/
function overlay_form_alter(&$form, &$form_state) {
// Add a hidden element to prevent dropping out of the overlay when a form is
// submitted inside the overlay using a GET method.
if (isset($form['#method']) && $form['#method'] == 'get' && isset($_REQUEST['render']) && $_REQUEST['render'] == 'overlay' && !isset($form['render'])) {
$form['render'] = array(
'#type' => 'hidden',
'#value' => 'overlay',
);
}
}
/**
* Implements hook_form_FORM_ID_alter().
*/
......
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