1 ajax_forms_test.module ajax_forms_test_lazy_load_form_submit($form, &$form_state)

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

File

core/modules/simpletest/tests/ajax_forms_test.module, line 505
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']) {
    backdrop_add_js(array('ajax_forms_test_lazy_load_form_submit' => 'executed'), 'setting');
    backdrop_add_css(backdrop_get_path('module', 'system') . '/css/system.admin.css');
    backdrop_add_js(backdrop_get_path('module', 'system') . '/js/system.admin.js');
  }
  $form_state['rebuild'] = TRUE;
}