You are here

function uc_stock_report_form in Ubercart 6.2

Same name and namespace in other branches
  1. 5 uc_stock/uc_stock.module \uc_stock_report_form()
  2. 7.3 uc_stock/uc_stock.admin.inc \uc_stock_report_form()

Form builder for stock report threshold filter.

See also

uc_stock_report_form_submit()

1 string reference to 'uc_stock_report_form'
uc_stock_report in uc_stock/uc_stock.admin.inc
Displays a stock report for products with stock tracking enabled.

File

uc_stock/uc_stock.admin.inc, line 107
Stock administration menu items.

Code

function uc_stock_report_form() {
  $form['threshold'] = array(
    '#type' => 'checkbox',
    '#title' => t('Only show SKUs that are below their threshold.'),
    '#default_value' => arg(4) == 'threshold' ? TRUE : FALSE,
    '#attributes' => array(
      'onchange' => 'this.form.submit();',
    ),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Update'),
    '#attributes' => array(
      'style' => "display:none;",
    ),
  );
  return $form;
}