You are here

function pmtimetracking_form_pmtimetracking_node_form_alter in Drupal PM (Project Management) 7.3

Same name and namespace in other branches
  1. 8 pmtimetracking/pmtimetracking.module \pmtimetracking_form_pmtimetracking_node_form_alter()
  2. 7.2 pmtimetracking/pmtimetracking.module \pmtimetracking_form_pmtimetracking_node_form_alter()

Implements hook_form_pmtimetracking_node_form_alter().

File

pmtimetracking/pmtimetracking.module, line 178
Main module functions for PM Timetracking.

Code

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

  // Hide duration and duration unit fields.
  if ((bool) variable_get('pmtimetracking_auto_duration', TRUE)) {
    $form['pm_duration']['#access'] = 0;
    $form['pm_durationunit']['#access'] = 0;
  }

  // Hide billing duration field.
  if ((bool) variable_get('pmtimetracking_auto_billing_duration', TRUE)) {
    $form['pm_billing_duration']['#access'] = 0;
  }
}