You are here

function uc_stock_settings_form in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_stock/uc_stock.admin.inc \uc_stock_settings_form()
  2. 7.3 uc_stock/uc_stock.admin.inc \uc_stock_settings_form()
1 string reference to 'uc_stock_settings_form'
uc_stock_menu in uc_stock/uc_stock.module
Implementation of hook_menu().

File

uc_stock/uc_stock.module, line 305

Code

function uc_stock_settings_form() {
  $form['uc_stock_threshold_notification'] = array(
    '#type' => 'checkbox',
    '#title' => t('Send email notification when stock level reaches its threshold value'),
    '#default_value' => variable_get('uc_stock_threshold_notification', FALSE),
  );
  $form['uc_stock_threshold_notification_recipients'] = array(
    '#type' => 'textfield',
    '#title' => t('Notification recipients'),
    '#default_value' => variable_get('uc_stock_threshold_notification_recipients', variable_get('uc_store_email', ini_get('sendmail_from'))),
    '#description' => t('The list of comma seperated email addresses that will receive the notification.'),
  );
  $form['uc_stock_threshold_notification_subject'] = array(
    '#type' => 'textfield',
    '#title' => t('Message subject'),
    '#default_value' => variable_get('uc_stock_threshold_notification_subject', uc_get_message('uc_stock_threshold_notification_subject')),
  );
  $form['uc_stock_threshold_notification_message'] = array(
    '#type' => 'textarea',
    '#title' => t('Message text'),
    '#default_value' => variable_get('uc_stock_threshold_notification_message', uc_get_message('uc_stock_threshold_notification_message')),
    '#description' => t('The message the user receives when the stock level reaches its threshold value (uses <a href="!token-help-page">global, order, and stock tokens</a>).', array(
      '!token-help-page' => url('admin/store/help/tokens'),
    )),
    '#rows' => 10,
  );
  $form['uc_stock_threshold_notification_format'] = filter_form(variable_get('uc_stock_threshold_notification_format', FILTER_FORMAT_DEFAULT), NULL, array(
    'uc_stock_threshold_notification_format',
  ));
  return system_settings_form($form);
}