Skip to content
Snippets Groups Projects
Commit 37c9455e authored by Joshua Walker's avatar Joshua Walker
Browse files

Merge pull request #79 from Swingline0/keep-class-assignment-in-buildForm

Revert removal of class assignment in buildForm, use QuickForm methods to apply.
parents 77c9c88e c0ee2058
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.
Please register or to comment