Raistlfiren / FAIconFieldType

A new field type to allow users to select font awesome icons. The field is based off the icon picker - http://mjolnic.com/fontawesome-iconpicker/
MIT License
1 stars 1 forks source link

type: repeater // does not work #5

Closed steiha closed 8 years ago

steiha commented 8 years ago

Breaks the admin panel if this field type is used inside repeater.

I tried to fix it, maybe I can do a pull request later.

If I remove the script tag from the twig template the admin panel works (of course the fa icon picker not)

This way it could probably be fixed:

Raistlfiren commented 8 years ago

I looked into this tonight, and it does seem like there is a bug with the repeating fields. I will see if I can't implement something better in the next few days through data attributes. Although, it is kind of a hack. Thanks for reporting this @steiha!

steiha commented 8 years ago

Just found that the repeater uses script tags to add template snippets to the source:

``

So if there are other script-tags inside it is all messed up. http://stackoverflow.com/questions/14261232/including-script-tag-in-script-type-text-template-tag

Raistlfiren commented 8 years ago

@steiha Thanks for reporting this. I have updated the code to now fix this problem with repeating fields. (Release V3.3) Configuration is now stored as a data attribute. I am closing this issue. If you have a similar problem, feel free to open a new issue.

Cheers!

Aaron