You are here

function theme_eu_cookie_compliance_popup_info in EU Cookie Compliance (GDPR Compliance) 5

This is a template function for a pop-up prompting user to give their consent for the website to set cookies.

When overriding this template it is important to note that jQuery will use the following classes to assign actions to buttons:

agree-button - agree to setting cookies find-more-button - link to an information page

Variables available:

  • $message: Contains the text that will be display whithin the pop-up
  • $link: Contains a link to an information page (not used in the original template as JQuery redirects to the information page on clinking the find-more button. $link is available though in case you want to overrride the template and display the link another way.
1 theme call to theme_eu_cookie_compliance_popup_info()
eu_cookie_compliance_footer in ./eu_cookie_compliance.module
Implements hook_footer().

File

./eu_cookie_compliance.module, line 216
This module intends to deal with the EU Directive on Privacy and Electronic Communications that comes into effect in the UK on 26th May 2012.

Code

function theme_eu_cookie_compliance_popup_info($message = NULL, $link = NULL) {
  $agree = t("Yes, I agree");
  $find_more = t("No, I want to find out more");
  return <<<POPUP
\t\t<div>
\t\t\t<div class ="popup-content info">
\t\t\t\t<div id="popup-text">
\t\t\t\t\t{<span class="php-variable">$message</span>}
\t\t\t\t</div>
\t\t\t\t<div id="popup-buttons">
\t\t\t\t\t<button type="button" class="agree-button">{<span class="php-variable">$agree</span>}</button>
\t\t\t\t\t<button type="button" class="find-more-button">{<span class="php-variable">$find_more</span>}</button>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
POPUP;
}