You are here

function answers_settings in Answers 7.4

Same name and namespace in other branches
  1. 5.2 answers.module \answers_settings()
  2. 6.2 answers.module \answers_settings()
  3. 7 answers.module \answers_settings()
  4. 7.2 answers.module \answers_settings()
  5. 7.3 includes/answers.form.inc \answers_settings()

Returns the form definition for answers configuration page.

4 string references to 'answers_settings'
answers_best_answer_form_alter in answers_best_answer/answers_best_answer.module
Implements hook_form_alter().
answers_lock_example_form_alter in answers_lock_example/answers_lock_example.module
Implements hook_form_alter().
answers_menu in ./answers.module
Implements hook_menu().
answers_userpoints_form_alter in answers_userpoints/answers_userpoints.module
Implements hook_form_alter().

File

./answers.module, line 83
The Answers module.

Code

function answers_settings() {
  $form = array();
  $form['additional_settings'] = array(
    '#type' => 'vertical_tabs',
    '#attached' => array(
      'js' => array(
        drupal_get_path('module', 'answers') . '/js/answers_admin.js',
      ),
    ),
  );
  $form['answers_question_lock_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('Lock Settings'),
    '#weight' => -100,
    '#collapsible' => TRUE,
    '#group' => 'additional_settings',
  );
  $form['answers_question_lock_settings']['answers_question_lock_message'] = array(
    '#type' => 'textfield',
    '#title' => t('!Question lock message', answers_translation()),
    '#description' => t('Text to use to notify user that a !question is locked', answers_translation()),
    '#default_value' => variable_get('answers_question_lock_message', t('Note: This question is locked.')),
  );
  $form['renaming'] = array(
    '#type' => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#title' => t('Branding'),
    '#group' => 'additional_settings',
  );
  $form['renaming']['question'] = array(
    '#type' => 'fieldset',
    '#title' => t('Questions'),
    '#weight' => -1,
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
  );
  $form['renaming']['question'][ANSWERS_TRANS_UCQUESTIONS] = array(
    '#type' => 'textfield',
    '#title' => t('Questions'),
    '#description' => t('Word to use in the interface for the upper case plural word !Questions', answers_translation()),
    '#default_value' => variable_get(ANSWERS_TRANS_UCQUESTIONS, 'Questions'),
    '#size' => 20,
    '#maxlength' => 20,
  );
  $form['renaming']['question'][ANSWERS_TRANS_LCQUESTIONS] = array(
    '#type' => 'textfield',
    '#title' => t('questions'),
    '#description' => t('Word to use in the interface for the lower case plural word !questions', answers_translation()),
    '#default_value' => variable_get(ANSWERS_TRANS_LCQUESTIONS, 'questions'),
    '#size' => 20,
    '#maxlength' => 20,
  );
  $form['renaming']['question'][ANSWERS_TRANS_UCQUESTION] = array(
    '#type' => 'textfield',
    '#title' => t('Question'),
    '#description' => t('Word to use in the interface for the upper case singular word !Question', answers_translation()),
    '#default_value' => variable_get(ANSWERS_TRANS_UCQUESTION, 'Question'),
    '#size' => 20,
    '#maxlength' => 20,
  );
  $form['renaming']['question'][ANSWERS_TRANS_LCQUESTION] = array(
    '#type' => 'textfield',
    '#title' => t('question'),
    '#description' => t('Word to use in the interface for the lower case singular word !question', answers_translation()),
    '#default_value' => variable_get(ANSWERS_TRANS_LCQUESTION, 'question'),
    '#size' => 20,
    '#maxlength' => 20,
  );
  $form['renaming']['question'][ANSWERS_TRANS_UCASKED] = array(
    '#type' => 'textfield',
    '#title' => t('Submitted', answers_translation()),
    '#description' => t('Word to use in the interface for the upper case word !Question_submitted', answers_translation()),
    '#default_value' => variable_get(ANSWERS_TRANS_UCASKED, 'Asked'),
    '#size' => 20,
    '#maxlength' => 20,
  );
  $form['renaming']['question'][ANSWERS_TRANS_LCASKED] = array(
    '#type' => 'textfield',
    '#title' => t('submitted', answers_translation()),
    '#description' => t('Word to use in the interface for the lower case word !question_submitted', answers_translation()),
    '#default_value' => variable_get(ANSWERS_TRANS_LCASKED, 'asked'),
    '#size' => 20,
    '#maxlength' => 20,
  );
  $form['renaming']['answer'] = array(
    '#type' => 'fieldset',
    '#title' => t('Answers'),
    '#weight' => -1,
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
  );
  $form['renaming']['answer'][ANSWERS_TRANS_UCANSWERS] = array(
    '#type' => 'textfield',
    '#title' => t('Answers'),
    '#description' => t('Word to use in the interface for the upper case plural word !Answers', answers_translation()),
    '#default_value' => variable_get(ANSWERS_TRANS_UCANSWERS, 'Answers'),
    '#size' => 20,
    '#maxlength' => 20,
  );
  $form['renaming']['answer'][ANSWERS_TRANS_LCANSWERS] = array(
    '#type' => 'textfield',
    '#title' => t('answers'),
    '#description' => t('Word to use in the interface for the lower case plural word !answers', answers_translation()),
    '#default_value' => variable_get(ANSWERS_TRANS_LCANSWERS, 'answers'),
    '#size' => 20,
    '#maxlength' => 20,
  );
  $form['renaming']['answer'][ANSWERS_TRANS_UCANSWER] = array(
    '#type' => 'textfield',
    '#title' => t('Answer'),
    '#description' => t('Word to use in the interface for the upper case singular word !Answer', answers_translation()),
    '#default_value' => variable_get(ANSWERS_TRANS_UCANSWER, 'Answer'),
    '#size' => 20,
    '#maxlength' => 20,
  );
  $form['renaming']['answer'][ANSWERS_TRANS_LCANSWER] = array(
    '#type' => 'textfield',
    '#title' => t('answer'),
    '#description' => t('Word to use in the interface for the lower case singular word !answer', answers_translation()),
    '#default_value' => variable_get(ANSWERS_TRANS_LCANSWER, 'answer'),
    '#size' => 20,
    '#maxlength' => 20,
  );
  $form['renaming']['answer'][ANSWERS_TRANS_UCANSWERED] = array(
    '#type' => 'textfield',
    '#title' => t('Submitted', answers_translation()),
    '#description' => t('Word to use in the interface for the upper case word !Answer_submitted', answers_translation()),
    '#default_value' => variable_get(ANSWERS_TRANS_UCANSWERED, 'Answered'),
    '#size' => 20,
    '#maxlength' => 20,
  );
  $form['renaming']['answer'][ANSWERS_TRANS_LCANSWERED] = array(
    '#type' => 'textfield',
    '#title' => t('submitted', answers_translation()),
    '#description' => t('Word to use in the interface for the lower case word !answer_submitted', answers_translation()),
    '#default_value' => variable_get(ANSWERS_TRANS_LCANSWERED, 'answered'),
    '#size' => 20,
    '#maxlength' => 20,
  );
  return system_settings_form($form);
}