Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #244 from deb1990/CPS-332-support-new-button-markup
Browse files Browse the repository at this point in the history
CPS-332: Style fix for discount apply button
  • Loading branch information
eileenmcnaughton authored Oct 22, 2020
2 parents f48afdc + 0c98e13 commit 461d4db
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions cividiscount.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 461d4db

Please sign in to comment.