You are here

function l10n_update_form_alter in Localization update 6

Same name and namespace in other branches
  1. 7.2 l10n_update.module \l10n_update_form_alter()
  2. 7 l10n_update.module \l10n_update_form_alter()

Implementation of hook_form_alter().

File

./l10n_update.module, line 108
Download translations from remote localization server.

Code

function l10n_update_form_alter(&$form, $form_state, $form_id) {
  switch ($form_id) {
    case 'locale_translate_edit_form':

      // Replace the submit callback by our own customized version
      $form['#submit'] = array(
        'l10n_update_locale_translate_edit_form_submit',
      );
      break;
    case 'system_modules':
      $form['#submit'][] = 'l10n_update_system_modules_submit';
      break;
    case 'system_modules_uninstall':
      $form['#submit'][] = 'l10n_update_system_modules_uninstall_submit';
      break;
    case 'locale_languages_predefined_form':
    case 'locale_languages_custom_form':
      $form['#submit'][] = 'l10n_update_languages_changed_submit';
      break;
    case 'locale_languages_delete_form':

      // A language is being deleted.
      $form['#submit'][] = 'l10n_update_languages_delete_submit';
      break;
  }
}