You are here

function advpoll_settings_form in Advanced Poll 7.3

Admin settings form.

1 string reference to 'advpoll_settings_form'
advpoll_menu in ./advpoll.module
Implements hook_menu().

File

includes/advpoll.admin.inc, line 10
: Advanced Poll administration.

Code

function advpoll_settings_form($form, &$form_state) {
  $form = array();
  $form['advpoll_percentage_precision'] = array(
    '#type' => 'textfield',
    '#title' => t('Percentage precision'),
    '#description' => t('Enter the number of decimal digits to display percentage tallies by (0 will display whole percentages only)'),
    '#default_value' => variable_get('advpoll_percentage_precision', 0),
  );
  $form['advpoll_percentage_rounding_method'] = array(
    '#type' => 'radios',
    '#title' => t('Percentage rounding method'),
    '#description' => t('Select rounding method to use when displaying percentage vote counts. Round is usually the best choice.'),
    '#options' => array(
      'floor' => t('Floor: round percentages down'),
      'round' => t('Round: round percentages up if greater than .5'),
    ),
    '#default_value' => variable_get('advpoll_percentage_rounding_method', 'round'),
  );
  return system_settings_form($form);
}