'textfield', '#title' => t('Issue directory'), '#default_value' => variable_get('project_directory_issues', 'issues'), '#size' => 30, '#maxlength' => 255, '#description' => t("Subdirectory in the directory '%dir' where attachments to issues will be stored.", array('%dir' => variable_get('file_directory_path', 'files') . '/')), '#after_build' => array('project_issue_check_directory'), ); $form['project_issue_show_comment_signatures'] = array( '#type' => 'checkbox', '#title' => t('Display user signatures on issue followups'), '#default_value' => variable_get('project_issue_show_comment_signatures', 0), '#description' => t('If selected, user signatures will be appended to the display of issue followups.'), ); $form['project_issue_reply_to'] = array( '#type' => 'textfield', '#title' => t('Reply-to address on e-mail notifications'), '#default_value' => variable_get('project_issue_reply_to', variable_get('site_mail', ini_get('sendmail_from'))), '#description' => t('All issue e-mails sent via subscriptions will appear from this e-mail address. You can use %project as a placeholder which will be replaced with the %short_project_name setting for the issue\'s current project.', array('%project' => '%project', '%short_project_name' => t('Short project name'))), ); // Determine the auto followup username from the auto followup setting. $followup_username = ''; $anon = variable_get('anonymous', t('Anonymous')); if ($followup_user_object = _project_issue_followup_get_user()) { $followup_username = $followup_user_object->name; } $form['project_issue_followup_user'] = array( '#title' => t('Auto-followup user'), '#type' => 'textfield', '#default_value' => $followup_username, '#maxlength' => 60, '#description' => t('Enter the name of the user which will create automatic followups to issues -- leave empty to disable auto-followup or set to %anon to use the anonymous user.', array('%anon' => $anon)), '#element_validate' => array('project_issue_validate_followup_user'), '#autocomplete_path' => 'user/autocomplete', ); $form['project_issue_auto_close_days'] = array( '#title' => t('Auto-close days'), '#type' => 'textfield', '#default_value' => (int) variable_get('project_issue_auto_close_days', PROJECT_ISSUE_AUTO_CLOSE_DAYS), '#size' => 4, '#maxlength' => 10, '#description' => t('Issues being in "fixed" state for the specified number of days will be closed by the followup user specified above. For example, if this is 14, and an issue is set to fixed on January 1, then it will be closed on January 15.'), ); $defaults = array(t('Code'), t('Documentation'), t('Miscellaneous'), t('User interface')); $components = variable_get('project_issue_default_components', implode("\n", $defaults)); $form['project_issue_default_components'] = array( '#type' => 'textarea', '#title' => t('Default components'), '#default_value' => $components, '#cols' => 20, '#rows' => 6, '#required' => TRUE, '#description' => t("Enter the default list of components that new projects will have. The project owner will be able to change this list on the project's edit/issues page."), '#element_validate' => array('project_issue_validate_default_components'), ); if (module_exists('mailhandler')) { // TODO: move this stuff to mailhandler.module ? $items = array(t('')); $result = db_query('SELECT mail FROM {mailhandler} ORDER BY mail'); while ($mail = db_result($result, $i++)) { $items[$mail] = $mail; } // Switch reply-to to a select box instead. $form['project_issue_reply_to']['#type'] = 'select'; $form['project_issue_reply_to']['#options'] = $items; } $form['project_issue_autocomplete'] = array( '#type' => 'radios', '#title' => t('Project selection widget'), '#default_value' => variable_get('project_issue_autocomplete', 0), '#options' => array(t('Select Menu'), t('Autocomplete')), ); $form['project_issue_site_help'] = array( '#title' => t('Site-wide help text for new issues'), '#type' => 'textarea', '#default_value' => variable_get('project_issue_site_help', ''), '#cols' => 20, '#rows' => 5, '#description' => t('Optionally enter site-wide help text that will be displayed whenever a user tries to create a new issue. Please note that there is no automatic formatting on this text, but you can use regular HTML tags as necessary (for example %p, %ul, and so on).', array('%p' => '

', '%ul' => '