Closed gazjoy closed 8 years ago
Hey,
Thanks for the contribution, one thing to note here, a contact form can be, and often is, placed on other pages, usually CMS pages. By locking the display logic down like you've done, people who like to add their contact form to the sidebar or into the content area of their site would be unable to do so.
It looks like I'll need to revert it back to how it was before, where you can override the isAllowed
method like so:
<reference name="content">
<block type="core/template" name="contactForm" template="contacts/form.phtml">
<action method="setFormAction"><value>/contacts/index/post</value></action>
<block type="studioforty9_recaptcha/explicit" name="studioforty9.recaptcha.explicit" template="studioforty9/recaptcha/explicit.phtml">
<action method="setAllow"><value>true</value></action>
</block>
</block>
</reference>
I'll add the code later today and push but since your PR failed the unit tests, I'll probably close this and re-implement locally.
Thanks, Eoghan
Spotted this didn't work on contact form so we had to make further mods to check the routes slightly differently.
Feel free to merge it if you think its right, works for our purposes.