I noticed the cc images where being assigned a width attribute of the name of the cc provider they represented (ie. width="Master Card");
Thought that was a little odd so i'm using that text to apply a relevant class name to the image.

Comments

smira’s picture

StatusFileSize
new928 bytes
quicksketch’s picture

StatusFileSize
new1.38 KB

This patch makes a necessary change, but I'm not sure the approach is solid:

+      $img_class = check_plain(strtolower(str_replace($search, $replace, $label)));

AFAIK, $label has already been translated, so if you were on a multilingual site, the class name would end up in the local language. Here's a reroll that simplifies the whole approach and just uses the card name as the classname (but it still runs it through drupal_html_class() just to be safe).

quicksketch’s picture

StatusFileSize
new692 bytes

Oops sorry that patch included fixes to the JS too. Here's a patch for specifically this problem.

quicksketch’s picture

StatusFileSize
new3.15 KB

Hm, turns out those JS changes were actually related to this particular issue. In Drupal 6, the labels themselves were images, but in D7 for some reason these were made into separate form elements. This makes the D7 version match the D6 approach, and it fixes the JS that comes with Pay so that it works again.

smira’s picture

Status: Needs review » Reviewed & tested by the community

Thanks quicksketch, looks nice now with the opacity working correctly.
+1 commit