You are here

function pmtimetracking_admin_settings in Drupal PM (Project Management) 7.3

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

Callback for the pmtimetracking admin settings page.

1 string reference to 'pmtimetracking_admin_settings'
pmtimetracking_menu in pmtimetracking/pmtimetracking.module
Implements hook_menu().

File

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

Code

function pmtimetracking_admin_settings() {
  $form = array();
  $form['pmtimetracking_auto_duration'] = array(
    '#type' => 'checkbox',
    '#title' => t('Automatically set duration based on start and end times.'),
    '#default_value' => variable_get('pmtimetracking_auto_duration', TRUE),
    '#description' => t('When checked, users will not be able to manually set the duration or duration unit. Instead, the duration will be set to the difference (in hours) between the start and end times.'),
  );
  $form['pmtimetracking_auto_billing_duration'] = array(
    '#type' => 'checkbox',
    '#title' => t('Automatically set billing duration equal to duration.'),
    '#default_value' => variable_get('pmtimetracking_auto_billing_duration', TRUE),
    '#description' => t('When checked, users will not be able to manually set the billing duration. Instead, the billing duration will be set equal to the duration.'),
  );
  return system_settings_form($form);
}