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

Styling the form field icons #10

Open
dmatthams opened this issue Dec 4, 2019 · 5 comments
Open

Styling the form field icons #10

dmatthams opened this issue Dec 4, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@dmatthams
Copy link

Hello, I've disabled font awesome as I already have it loaded and have set custom icons on a page like this:

{% do craft.starRatings.setIcons({
    'full'  : '<i class="fas fa-star"></i>',
    'empty' : '<i class="far fa-star"></i>',
}) %}

This successfully changes the icons when pulling the rating from an entry i.e: {{ craft.starRatings.stars(entry.reviewsFeaturedReview[0].id) }} but not for the form field: {{ craft.starRatings.formField('reviewRating') }}. Here, it's still trying to use far fa-star-o for the empty star?

Am I doing something wrong or is this a bug?

Thanks

@lindseydiloreto
Copy link
Contributor

It's definitely a bug, thanks for reporting. 👍

I'll try to take a look into patching it soon... I don't have a specific ETA, sorry.

@lindseydiloreto lindseydiloreto added the bug Something isn't working label Dec 4, 2019
@dmatthams
Copy link
Author

No worries, thanks. Will just re-enabled included font awesome for now.

@dmatthams
Copy link
Author

I've hard-coded the field.js file to use far fa-star instead of fa fa-star-o just to make it compatible with latest version of font awesome (fa-star-o no longer exists). Possibly worth doing the same on the next release, updating the font awesome dependency.

@dmatthams
Copy link
Author

Also (last thing I promise!) turning font awesome off renders the field type useless.

@lindseydiloreto
Copy link
Contributor

That sounds good. Hacking the JS file was definitely the right solution for now. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants