From 0c98e13b0c7eca07812ff9c11e0c00cf95427f19 Mon Sep 17 00:00:00 2001 From: Debarshi Bhaumik Date: Mon, 19 Oct 2020 12:46:48 +0100 Subject: [PATCH] CPS-332: Style fix for discount apply button --- cividiscount.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/cividiscount.php b/cividiscount.php index f60023c..0e3a885 100644 --- a/cividiscount.php +++ b/cividiscount.php @@ -1055,7 +1055,16 @@ function _cividiscount_add_discount_textfield(&$form) { } $form->set('discountCodeErrorMsg', NULL); $buttonName = $form->getButtonName('reload'); - $form->addElement('submit', $buttonName, E::ts('Apply'), ['formnovalidate' => 1]); + $form->addElement( + 'xbutton', + $buttonName, + E::ts('Apply'), + [ + 'formnovalidate' => 1, + 'type' => 'submit', + 'class' => 'crm-form-submit', + ] + ); $template = CRM_Core_Smarty::singleton(); $bhfe = $template->get_template_vars('beginHookFormElements'); if (!$bhfe) { @@ -1115,7 +1124,16 @@ function _cividiscount_add_button_before_priceSet(&$form) { } $form->set('discountCodeErrorMsg', NULL); $buttonName = $form->getButtonName('reload'); - $form->addElement('submit', $buttonName, E::ts('Apply'), ['formnovalidate' => 1]); + $form->addElement( + 'xbutton', + $buttonName, + E::ts('Apply'), + [ + 'formnovalidate' => 1, + 'type' => 'submit', + 'class' => 'crm-form-submit', + ] + ); $form->assign('discountElements', [ 'discountcode', $buttonName