You are here

function jqmulti_admin_afterbuild in jQuery Multi 6

An after_build callback for the admin form.

1 string reference to 'jqmulti_admin_afterbuild'
jqmulti_admin_form in ./jqmulti.admin.inc
Admin form for jQuery Multi module.

File

./jqmulti.admin.inc, line 70
Admin-related functions for the jQuery Multi module.

Code

function jqmulti_admin_afterbuild($form, &$form_state) {

  // disable libraries that are turned on by hooks
  $hooked_libraries = module_invoke_all('jqmulti_libraries');
  $available_libraries = $form['jqmulti_libraries']['#options'];
  foreach ($available_libraries as $library => $lib) {
    if (in_array($library, $hooked_libraries)) {
      $form['jqmulti_libraries'][$library]['#default_value'] = TRUE;
      $form['jqmulti_libraries'][$library]['#value'] = TRUE;
      $form['jqmulti_libraries'][$library]['#attributes']['disabled'] = 'disabled';
    }
  }
  return $form;
}