The attached patch adds a "uc-credit-cctype" class and a "uc-credit-cctype-XXX" class (e.g. uc-credit-cctype-visa) to each of the credit card type icons on the checkout form. This allows for additional theming and js functionality.

My use case was that based on the currency selected (with uc_multiprice module) the supported card types had to change. I was able to change the drop-down with a hook_form_alter() but to change the icons displayed I need to be able to target the individual img tags so I could hide/show them using custom javascript. Adding class names to the img tags allowed that.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Works for me, though ultimately it would be better if this line used theme('image', ...) and the CSS wasn't hardcoded.

Island Usurper’s picture

Status: Reviewed & tested by the community » Fixed

OK. Committed.

longwave’s picture

Status: Fixed » Patch (to be ported)

Needs porting to 7.x.

Island Usurper’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Status: Patch (to be ported) » Fixed
FileSize
672 bytes

Ported and committed.

Island Usurper’s picture

FileSize
672 bytes

Ported and committed.

longwave’s picture

Status: Fixed » Reviewed & tested by the community

That patch does not appear to be in CVS.

Island Usurper’s picture

Status: Reviewed & tested by the community » Fixed

Oops. Fixed for reals now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.