From be6dcd4e0d23f981a01f4537816d2f8420ed9c00 Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Wed, 17 Dec 2014 15:59:33 -0800 Subject: [PATCH] CRM-14696 - make sold out options a bit easier to see by making the entire option italic and grey. ---------------------------------------- * CRM-14696: https://issues.civicrm.org/jira/browse/CRM-14696 --- CRM/Price/BAO/PriceField.php | 10 +++++----- css/civicrm.css | 12 +++++++++--- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CRM/Price/BAO/PriceField.php b/CRM/Price/BAO/PriceField.php index 0ac93479df..a1bc87c119 100644 --- a/CRM/Price/BAO/PriceField.php +++ b/CRM/Price/BAO/PriceField.php @@ -332,7 +332,7 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { if (in_array($optionKey, $freezeOptions)) { $element->freeze(); // CRM-14696 - Improve display for sold out price set options - $element->setLabel($label . ' ' . ts('Sold out') . ''); + $element->setLabel($label . ' (' . ts('Sold out') . ')'); } //CRM-10117 @@ -404,7 +404,7 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { if (in_array($opId, $freezeOptions)) { $choice[$opId]->freeze(); // CRM-14696 - Improve display for sold out price set options - $choice[$opId]->setText($choice[$opId]->getText() . '  (' . ts('Sold out') . ')'); + $choice[$opId]->setText('' . $choice[$opId]->getText() . ' (' . ts('Sold out') . ')'); } } if (!empty($qf->_membershipBlock) && $field->name == 'contribution_amount') { @@ -470,8 +470,8 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { $allowedOptions[] = $opt['id']; } // CRM-14696 - Improve display for sold out price set options - else { - $opt['label'] = $opt['label'] . ' (' . ts('Sold out') . ')'; + else { + $opt['label'] = $opt['label'] . ' (' . ts('Sold out') . ')'; } $selectOption[$opt['id']] = $opt['label']; @@ -527,7 +527,7 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField { if (in_array($opId, $freezeOptions)) { $check[$opId]->freeze(); // CRM-14696 - Improve display for sold out price set options - $check[$opId]->setText($check[$opId]->getText() . ' (' . ts('Sold out') . ')'); + $check[$opId]->setText('' . $check[$opId]->getText() . ' (' . ts('Sold out') . ')'); } } $element = &$qf->addGroup($check, $elementName, $label); diff --git a/css/civicrm.css b/css/civicrm.css index 485ed2aeaf..6d4f7c0dbb 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -4282,8 +4282,10 @@ span.crm-status-icon { max-width: 100%; } -#crm-container.crm-public .label { +#crm-container.crm-public .label, +#crm-container.crm-public .price-field-amount { padding-top: 6px; + font-size: 15px; } .crm-container.crm-public .select2-container, @@ -4466,8 +4468,12 @@ span.crm-status-icon { display: none; } -#crm-container .price_set-section .sold-out-option { - font-style: italic; +#crm-container .sold-out-option, +#crm-container .price-set-row span.sold-out-option .crm-price-amount-label, +#crm-container .price-set-row span.sold-out-option .crm-price-amount-amount { + font-style: italic !important; + font-weight: normal !important; + color: #666 !important; } #crm-container .crm-extensions-upgrade { background: #ffb; -- 2.25.1