You are here

function coder_upgrade_conversions_form in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_upgrade/includes/conversion.inc \coder_upgrade_conversions_form()

Form builder for the module conversion form.

The tab contents are assembled in helper functions which allows other modules to "customize" this form directly without resorting to hook_form_alter.

1 string reference to 'coder_upgrade_conversions_form'
_coder_upgrade_menu in coder_upgrade/includes/menu.inc
Implements hook_menu().

File

coder_upgrade/includes/conversion.inc, line 17

Code

function coder_upgrade_conversions_form($form, &$form_state) {

  // Confirm the necessary module and library are installed.
  $checks_passed = coder_upgrade_library_checks();

  // Set default values.
  list($upgrades, $extensions, $directories, $modules) = coder_upgrade_conversions_form_defaults($form_state);

  // Build the form.
  $form['tabs'] = array(
    '#type' => 'vertical_tabs',
    '#default_tab' => 'edit-directories',
  );
  $form['tabs']['upgrades'] = coder_upgrade_upgrades_build($upgrades);
  $form['tabs']['extensions'] = coder_upgrade_extensions_build($extensions);
  $form['tabs']['directories'] = coder_upgrade_directories_build($directories);
  $form['tabs']['modules'] = coder_upgrade_modules_build($modules);
  $form['convert'] = array(
    '#type' => 'submit',
    '#value' => t('Convert files'),
    '#disabled' => !gplib_version_check(),
  );
  return $form;
}