You are here

function tmgmt_ui_settings_form in Translation Management Tool 7

Form callback for the settings form.

See also

system_settings_form()

1 string reference to 'tmgmt_ui_settings_form'
tmgmt_ui_menu in ui/tmgmt_ui.module
Implements hook_menu().

File

ui/includes/tmgmt_ui.pages.inc, line 14
Provides page callbacks and form functions for the Translation Management Tool User Interface module.

Code

function tmgmt_ui_settings_form($form, &$form_state) {
  $form['workflow'] = array(
    '#type' => 'fieldset',
    '#title' => t('Workflow settings'),
  );
  $form['workflow']['tmgmt_quick_checkout'] = array(
    '#type' => 'checkbox',
    '#title' => t('Allow quick checkout'),
    '#description' => t("Enabling this will skip the checkout form and instead directly process the translation request in cases where there is only one translator available which doesn't provide any additional configuration options."),
    '#default_value' => variable_get('tmgmt_quick_checkout', TRUE),
  );
  $form['performance'] = array(
    '#type' => 'fieldset',
    '#title' => t('Performance settings'),
  );
  $form['performance']['tmgmt_purge_finished'] = array(
    '#type' => 'select',
    '#title' => t('Purge finished jobs'),
    '#description' => t('If configured, translation jobs that have been marked as finished will be purged after a given time. The translations itself will not be deleted.'),
    '#options' => array(
      '_never' => t('Never'),
      '0' => t('Immediately'),
      '86400' => t('After 24 hours'),
      '604800' => t('After 7 days'),
      '2592000' => t('After 30 days'),
      '31536000' => t('After 365 days'),
    ),
    '#default_value' => variable_get('tmgmt_purge_finished', '_never'),
  );
  return system_settings_form($form);
}