You are here

function certificate_alter_node_form in Certificate 3.x

Same name and namespace in other branches
  1. 8.3 certificate.admin.inc \certificate_alter_node_form()
  2. 6.2 certificate.admin.inc \certificate_alter_node_form()
  3. 6 certificate.admin.inc \certificate_alter_node_form()
  4. 7.3 certificate.admin.inc \certificate_alter_node_form()
  5. 7.2 certificate.admin.inc \certificate_alter_node_form()

Alters the node form to inject the appropriate per-node template settings.

1 call to certificate_alter_node_form()
certificate_field_attach_form in ./certificate.module
Implements hook_field_attach_form().

File

./certificate.admin.inc, line 100
Administrative pages for Certificate module.

Code

function certificate_alter_node_form(&$form, &$form_state) {
  global $user;

  // Add template-mapping form.
  // Note, make sure to set #tree to TRUE.
  if (user_access('administer certificates') || user_access('assign certificates')) {
    $form['certificate'] = array(
      '#type' => 'fieldset',
      '#title' => t('Certificate settings'),
      '#tree' => TRUE,
      '#description' => t('Set up the selection criteria for awarding certificates.'),
    );
    certificate_mapping_form($form, $form_state);
  }
}