Skip to content
Snippets Groups Projects
Commit 7752123c authored by theo_'s avatar theo_ Committed by Ryan Szrama
Browse files

Issue #1719454 by theo_, bojanz: allow the line item summary area handler to...

Issue #1719454 by theo_, bojanz: allow the line item summary area handler to display in the no results area and simplify our empty text area handler code.
parent b0b1fd63
No related branches found
No related tags found
No related merge requests found
......@@ -8,9 +8,6 @@ class commerce_customer_handler_area_empty_text extends views_handler_area {
function option_definition() {
$options = parent::option_definition();
// Undefine the empty option.
unset($options['empty']);
// Define an option to link to a customer profile add form.
$options['add_path'] = array('default' => '');
......@@ -20,9 +17,6 @@ class commerce_customer_handler_area_empty_text extends views_handler_area {
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// Don't display a form element for the undefined empty option.
unset($form['empty']);
$form['add_path'] = array(
'#type' => 'textfield',
'#title' => t('Path to a customer profile add form'),
......
......@@ -9,9 +9,6 @@ class commerce_line_item_handler_area_line_item_summary extends views_handler_ar
function option_definition() {
$options = parent::option_definition();
// Undefine the empty option.
unset($options['empty']);
// Define an option to control the links displayed in the summary.
$options['links'] = array('default' => array());
......@@ -31,9 +28,6 @@ class commerce_line_item_handler_area_line_item_summary extends views_handler_ar
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// Don't display a form element for the undefined empty option.
unset($form['empty']);
// Add checkboxes for the summary links if any are available.
$options = array();
......@@ -84,7 +78,7 @@ class commerce_line_item_handler_area_line_item_summary extends views_handler_ar
}
function render($empty = FALSE) {
if (!$empty) {
if (!$empty || !empty($this->options['empty'])) {
// Build an array of line item IDs from the View results that we will load
// and use for calculating totals.
$line_item_ids = array();
......
......@@ -8,9 +8,6 @@ class commerce_order_handler_area_empty_text extends views_handler_area {
function option_definition() {
$options = parent::option_definition();
// Undefine the empty option.
unset($options['empty']);
// Define an option to link to an order creation form.
$options['add_path'] = array('default' => '');
......@@ -20,9 +17,6 @@ class commerce_order_handler_area_empty_text extends views_handler_area {
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// Don't display a form element for the undefined empty option.
unset($form['empty']);
$form['add_path'] = array(
'#type' => 'textfield',
'#title' => t('Path to an order creation form'),
......
......@@ -8,9 +8,6 @@ class commerce_product_handler_area_empty_text extends views_handler_area {
function option_definition() {
$options = parent::option_definition();
// Undefine the empty option.
unset($options['empty']);
// Define an option to link to a product add form.
$options['add_path'] = array('default' => '');
......@@ -20,9 +17,6 @@ class commerce_product_handler_area_empty_text extends views_handler_area {
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// Don't display a form element for the undefined empty option.
unset($form['empty']);
$form['add_path'] = array(
'#type' => 'textfield',
'#title' => t('Path to a product add form'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment