You are here

function summarize_checkbox in Ubercart 6.2

Returns the summary string for a checkbox element based on its current value.

Parameters

$true: The summary string to use if the checkbox has been checked.

$false: The summary string to use if the checkbox has not been checked.

Return value

The correct supplied string based on the current value of the checkbox.

9 string references to 'summarize_checkbox'
uc_cart_checkout_settings_form in uc_cart/uc_cart.admin.inc
General checkout settings.
uc_catalog_grid_settings_form in uc_catalog/uc_catalog.admin.inc
Settings forms for using a product grid instead of a table in the catalog.
uc_catalog_settings_form in uc_catalog/uc_catalog.admin.inc
Catalog settings form.
uc_order_settings_form in uc_order/uc_order.admin.inc
Generates the settings form for orders.
uc_payment_methods_form in payment/uc_payment/uc_payment.admin.inc
Displays an overview of the available payment methods.

... See full list

File

uc_store/includes/summaries.inc, line 148
Provides summaries of forms and fieldsets.

Code

function summarize_checkbox($form, $true, $false) {
  if ($form['#default_value']) {
    return $true;
  }
  else {
    return $false;
  }
}