You are here

function persiantools_admin_settings in PersianTools 7

Form builder. Configure persiantools settings.

See also

system_settings_form()

1 string reference to 'persiantools_admin_settings'
persiantools_menu in ./persiantools.module
Implements hook_menu().

File

./persiantools.admin.inc, line 14
Administration page callbacks for the persiantools module.

Code

function persiantools_admin_settings() {

  // TODO: add option to convert decimal symbol: no, smart, comma.
  $form['digit_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('Digits and Numbers Settings'),
  );
  $form['digit_settings']['persiantools_digit_method'] = array(
    '#type' => 'radios',
    '#title' => t('Conversion Method'),
    '#options' => array(
      'none' => t('None'),
      'smart' => t('Smart'),
      'full' => t('Full'),
    ),
    '#description' => t('Select method for converting english numbers to persian.'),
    '#default_value' => variable_get('persiantools_digit_method', 'full'),
  );
  $form['persiantools_rtl_ltr_fix'] = array(
    '#type' => 'checkbox',
    '#title' => t('Fix multi-directional texts'),
    '#description' => t('Fix mess in mixed english and persian texts.'),
    '#default_value' => variable_get('persiantools_rtl_ltr_fix', TRUE),
  );
  $form['persiantools_sort_fix'] = array(
    '#type' => 'fieldset',
    '#title' => t('Persian Sort'),
  );
  $form['persiantools_sort_fix']['submit_btn'] = array(
    '#type' => 'submit',
    '#value' => t('Fix persian sort in all tables'),
    '#submit' => array(
      'persiantools_sort_fix_submit',
    ),
  );
  return system_settings_form($form);
}