You are here

function opigno_form_alter in Opigno 7

Implements hook_form_alter().

File

./opigno.module, line 330
Contains all hook_implementations and module specific API.

Code

function opigno_form_alter(&$form, &$form_state, $form_id) {

  // UX: Add a confirmation to the permissions form to ask the user whether to
  // auto-enable the 'access opigno administration pages' permission along with
  // 'access administration pages'.
  if ($form_id == 'user_admin_permissions') {
    $form['#attached']['js'][] = drupal_get_path('module', 'opigno') . '/js/opigno.admin.js';
  }
  if ($form_id == "og_ui_confirm_subscribe") {
    $form['#submit'][] = "opigno_set_user_as_student";
  }
}