You are here

function uc_stock_report_form in Ubercart 7.3

Same name and namespace in other branches
  1. 5 uc_stock/uc_stock.module \uc_stock_report_form()
  2. 6.2 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 153
Stock administration menu items.

Code

function uc_stock_report_form($form, &$form_state) {
  $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['actions'] = array(
    '#type' => 'actions',
  );
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Update'),
    '#attributes' => array(
      'style' => "display:none;",
    ),
  );
  return $form;
}