JacksonRiver/springboard_modules — pull request #456 by epicflux (2014-03-20 13:24:03+00:00)
Title: 7.x 723 page wrappers adds theme css

Issue:
Using the country dropdown on a donation form adds style sheets removed by the page wrapper.

In depth:
On a standard request of a donation form where it appears on a 'node/[nid]' path Page Wrappers uses hook_css_alter to remove style sheets coming from the theme. Since the country dropdown fires of an ajax request, where the path is different, those style sheets are added back as is standard ajax functionality in Drupal.

Replicate:
Use the country dropdown to select another country on a heavily styled page wrapped donation form, you should see various changes in form elements & layout.

Fix:
In _page_wrappers_node_assigned_wrapper() we've added code that intercepts an ajax request and uses a function to load the node from the cached form data. The form in this instance will be the one initiating the ajax request.

Additionally:
We've added a drupal_alter for 'page_wrappers_page_node' so additional path lookups can be added easily by other modules.

There was a php strict warning in _fundraiser_commerce_client_state_ajax_submit() about passing a function by reference; the code was changed to create a variable to pass to render().