Form submit handler: Adds JavaScript and CSS that wasn't on the original form.

1 string reference to 'ajax_forms_test_lazy_load_form_submit'
AJAXFrameworkTestCase::testLazyLoad in modules/simpletest/tests/ajax.test
Test that new JavaScript and CSS files added during an AJAX request are returned.

File

modules/simpletest/tests/ajax_forms_test.module, line 502
Simpletest mock module for Ajax forms testing.

Code

function ajax_forms_test_lazy_load_form_submit($form, &$form_state) {
  if ($form_state['values']['add_files']) {
    drupal_add_js(array(
      'ajax_forms_test_lazy_load_form_submit' => 'executed',
    ), 'setting');
    drupal_add_css(drupal_get_path('module', 'system') . '/system.admin.css');
    drupal_add_js(drupal_get_path('module', 'system') . '/system.js');
  }
  $form_state['rebuild'] = TRUE;
}