Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use class instead data-hook for gateway partial #2212

Closed
wants to merge 1 commit into from

Conversation

ccarruitero
Copy link
Contributor

Given that other fields in the partial have a data-hook and class to allow easy customization, I think will be good that card name field have the same

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, left a comment for avoid data-hook usage.

@@ -1,9 +1,9 @@
<%= image_tag 'credit_cards/credit_card.gif', id: 'credit-card-image' %>
<% param_prefix = "payment_source[#{payment_method.id}]" %>

<p class="field">
<p class="field" data-hook="card_name">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the general feeling is to remove data-hook attributes. To follow this path you could use a class instead, like:

<p class="field payment-form-card-name">

and add a similar class to the other elements for consistency (number and expiration).

You should be able to hook this element with a class as well, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, there shouldn't be a problem.

I'm going to update the elements to use class.

@ccarruitero ccarruitero changed the title add data-hook and class for card_name in gateway partial use class instead data-hook for gateway partial Oct 25, 2017
@kennyadsl
Copy link
Member

@ccarruitero Can you please rebase this?

@kennyadsl
Copy link
Member

@ccarruitero ping 🙂

@aitbw
Copy link
Contributor

aitbw commented May 20, 2019

Closing now that #3182 was merged, thanks @ccarruitero!

@kennyadsl kennyadsl closed this May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants