38 lines
1.6 KiB
PHP
38 lines
1.6 KiB
PHP
<?php
|
|
|
|
function stormquicktt_settings() {
|
|
$form = array();
|
|
$form['stormquicktt_mintime2record'] = array(
|
|
'#type' => 'textfield',
|
|
'#title' => t('Minimum time to be recorded (minutes)'),
|
|
'#default_value' => variable_get('stormquicktt_mintime2record', 5),
|
|
);
|
|
$form['stormquicktt_default_title'] = array(
|
|
'#type' => 'textfield',
|
|
'#title' => t('Default title'),
|
|
'#default_value' => variable_get('stormquicktt_default_title', t('Auto-generated Timetracking')),
|
|
);
|
|
$status_option_prj = array('none' => t('-none-'));
|
|
$project_status = storm_attributes_bydomain('Project status');
|
|
$status_option_prj = array_merge($status_option_prj, $project_status['values']);
|
|
|
|
$form['stormquicktt_project_stati'] = array(
|
|
'#type' => 'select',
|
|
'#title' => t('Display projects with following status'),
|
|
'#options' => $status_option_prj,
|
|
'#multiple' => TRUE,
|
|
'#size' => 5,
|
|
'#default_value' => variable_get('stormquicktt_project_stati', array('in progress')),
|
|
'#description' => t('Select multiple values by pressing the ctrl-key while selecting with the mouse.'),
|
|
);
|
|
|
|
$form['stormquicktt_pause_split'] = array(
|
|
'#type' => 'checkbox',
|
|
'#title' => t('Split timetrackings on pause.'),
|
|
'#description' => t('If selected there are multiple timetrackings for before and after each break. '.
|
|
'If unset there is one timetracking for the whole time, but the pause time will be subtracted from the billing duration.'),
|
|
'#default_value' => variable_get('stormquicktt_pause_split', FALSE),
|
|
);
|
|
|
|
return system_settings_form($form);
|
|
}
|