Hello, I would like to add an additional checkbox on registration to respect the upcoming GDPR law.
Under "Accept terms and conditons" checkbox, I would like to add a second mendatory checkbox "Accept privacy policy".
I modified the file templates/mytemplate/html/com_community/layouts/register/base.php and copy the source code of the tac block to create a new one. I also modified the lang strings to have the right sentence. So now here is what I have in base.php :
<?php if ( $config->get('enableterms') ) { ?>
<div class="joms-checkbox">
<input type="checkbox" name="tnc" value="Y" data-message="<?php echo JText::_('COM_COMMUNITY_REGISTER_ACCEPT_TNC'); ?>">
<span><?php echo JText::_('COM_COMMUNITY_I_HAVE_READ') . ' <a href="javascript:" onclick="joms.api.tnc(0);">' . JText::_('COM_COMMUNITY_TERMS_AND_CONDITION') . '</a>.'; ?></span>
</div>
<div class="joms-checkbox">
<input type="checkbox" name="privacypolicy" value="Y" data-message="<?php echo JText::_('COM_COMMUNITY_REGISTER_ACCEPT_PRIVACY_POLICY'); ?>">
<span><?php echo JText::_('COM_COMMUNITY_I_HAVE_READ') . ' <a href="javascript:" onclick="joms.api.privacypolicy(0);">' . JText::_('COM_COMMUNITY_PRIVACY_POLICY') . '</a>.'; ?></span>
</div>
My problem is about the javascript for the popup window. I have no idea how and where to modify js files to have this second checkbox fully working.
If someone have an idea about that, it will be a great help, Thanks!
HI, Christian.
Thank you for contacting us.
It's not only the code you add into layout - you'll need also customize database to store your privacy policy to display it in modal window.
Instead of creating new checkbox - why don't you simply combine them in one document just in this place to display them in one window. YOu may have separated links in footer - just combine them for registration flow. Then you won't need second checkbox.
Hi Michat, thanks again for your feedback. I read the details of upcoming GDPR european law, and it appears that it will be mendatory to clearly have 2 different checkboxes when a user subscribe web services for TOS and Privacy Policy and not both together.
That's why I would like to already prepare my website with such checkboxes.
HI, Christian.
Okay, you already created a checkbox. To make thing more easy just create article with your Privacy policy.
Then you may use JCE Media Box plugin to display article in modal window.
Check how plugin creates links to pop up and use own article with link like this:
index.php?option=com_content&view=article&id=65&tmpl=component
Result will be a link in form, after clicking it, modal window with article will be displayed.
Check more by googling JCE Media Box plugin.