Skip to content
Snippets Groups Projects
Commit c0ee2058 authored by Eran's avatar Eran
Browse files

Revert removal of class assignment in buildForm, use methods to apply

parent 77c9c88e
No related branches found
No related tags found
No related merge requests found
......@@ -143,14 +143,8 @@ function stripe_civicrm_buildForm($formName, &$form) {
if (isset($form->_paymentProcessor['payment_processor_type']) && $form->_paymentProcessor['payment_processor_type'] == 'Stripe') {
if (!stristr($formName, '_Confirm') && !stristr($formName, '_ThankYou')) {
// This is the 'Main', or first step of the form that collects CC data.
if (!isset($form->_elementIndex['stripe_token'])) {
/*
* Moved this to civicrm_stripe.js for webform patch
* if (empty($form->_attributes['class'])) {
* $form->_attributes['class'] = '';
* }
* $form->_attributes['class'] .= ' stripe-payment-form';
*/
if (!$form->elementExists('stripe_token')) {
$form->setAttribute('class', $form->getAttribute('class') . ' stripe-payment-form');
$form->addElement('hidden', 'stripe_token', NULL, array('id' => 'stripe-token'));
$form->addElement('hidden', 'stripe_id', $form->_paymentProcessor['id'], array('id' => 'stripe-id'));
stripe_add_stripe_js($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