You are here

function barcode_settings in Barcode 6

Same name and namespace in other branches
  1. 6.2 includes/barcode.admin.inc \barcode_settings()
  2. 7.2 includes/barcode.admin.inc \barcode_settings()

Menu callback to configure barcode module settings.

1 string reference to 'barcode_settings'
barcode_menu in ./barcode.module
Implementation of hook_menu() Configuration

File

./barcode.module, line 283

Code

function barcode_settings() {
  $form['barcode_encoding'] = array(
    '#type' => 'select',
    '#title' => t('Encoding Method'),
    '#default_value' => variable_get('barcode_encoding', 'UPC-A'),
    '#multiple' => FALSE,
    '#options' => array(
      'UPC-A' => t('UPC-A'),
      'EAN-13' => t('EAN-13'),
      'EAN-8' => t('EAN-8'),
      'UPC-E' => t('UPC-E'),
      'S205' => t('S205'),
      'I2O5' => t('I2O5'),
      'I25' => t('I25'),
      'POSTNET' => t('POSTNET'),
      'CODABAR' => t('CODABAR'),
      'CODE128' => t('CODE128'),
      'CODE39' => t('CODE39'),
      'CODE93' => t('CODE93'),
    ),
    '#required' => TRUE,
  );
  $form['barcode_height'] = array(
    '#title' => t('Height'),
    '#description' => t('Integer! in order to scan the printed barcode, the suggested height is 30'),
    '#type' => 'textfield',
    '#default_value' => variable_get('barcode_height', 30),
    '#size' => 2,
    '#required' => TRUE,
  );
  $form['barcode_scale'] = array(
    '#title' => t('Scale'),
    '#description' => t('Float! in order to scan the printed barcode, the suggested height is 2.0'),
    '#type' => 'textfield',
    '#default_value' => variable_get('barcode_scale', 2.0),
    '#size' => 2,
    '#required' => TRUE,
  );
  $form['barcode_bcolor'] = array(
    '#title' => t('Background Color'),
    '#description' => t('Hex value'),
    '#type' => 'textfield',
    '#default_value' => variable_get('barcode_bcolor', '#000000'),
    '#size' => 8,
    '#required' => TRUE,
  );
  $form['barcode_barcolor'] = array(
    '#title' => t('Bar Color'),
    '#description' => t('Hex value'),
    '#type' => 'textfield',
    '#default_value' => variable_get('barcode_barcolor', '#FFFFFF'),
    '#size' => 8,
    '#required' => TRUE,
  );
  $form['barcode_font'] = array(
    '#title' => t('Font File'),
    '#description' => t('the relative path to Drupal\'s base'),
    '#type' => 'textfield',
    '#default_value' => variable_get('barcode_font', drupal_get_path('module', 'barcode') . "/arialbd.ttf"),
    '#size' => 60,
    '#required' => TRUE,
  );
  return system_settings_form($form);
}