Guest User

Combining Terms & Conditions and Privacy Policy

a guest
Apr 27th, 2026
63
1
Never
9
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | Software | 1 0
  1. <?php
  2.  
  3. defined('_JEXEC') or die;
  4.  
  5. use Joomla\CMS\Language\Text;
  6. use Joomla\CMS\Router\Route;
  7.  
  8. /**
  9. * Layout variables
  10. * -----------------
  11. * @var string $controlGroupClass
  12. * @var string $controlLabelClass
  13. * @var string $controlsClass
  14. * @var int $articleId
  15. */
  16.  
  17. /* Terms link */
  18. $termLink = EventbookingHelperHtml::getArticleUrl($articleId);
  19.  
  20. if (!$termLink)
  21. {
  22. return;
  23. }
  24.  
  25. /* Terms popup / new window */
  26. if ($this->config->open_article_on_new_window)
  27. {
  28. $linkAttrs = 'target="_blank"';
  29. }
  30. else
  31. {
  32. $linkAttrs = 'class="eb-colorbox-term"';
  33. }
  34.  
  35. /* Privacy link */
  36. $privacyLink = '';
  37.  
  38. if ($this->config->show_privacy_policy_checkbox)
  39. {
  40. if ($this->config->privacy_policy_url)
  41. {
  42. $privacyLink = $this->config->privacy_policy_url;
  43. }
  44. elseif ($this->config->privacy_policy_article_id > 0)
  45. {
  46. $privacyLink = EventbookingHelperHtml::getArticleUrl($this->config->privacy_policy_article_id);
  47. }
  48. }
  49.  
  50. /* Privacy popup / new window */
  51. if ($privacyLink)
  52. {
  53. if ($this->config->privacy_policy_url || $this->config->open_article_on_new_window)
  54. {
  55. $privacyAttrs = 'target="_blank"';
  56. }
  57. else
  58. {
  59. $privacyAttrs = 'class="eb-colorbox-privacy-policy eb-colorbox-term"';
  60. }
  61. }
  62. ?>
  63.  
  64. <div class="<?php echo $controlGroupClass; ?> eb-terms-and-conditions-container">
  65.  
  66. <div class="<?php echo $controlLabelClass; ?>">
  67. <?php echo Text::_('EB_TERM_AND_CONDITION'); ?> <span class="required">*</span>
  68. </div>
  69.  
  70. <div class="<?php echo $controlsClass; ?>">
  71.  
  72. <label class="checkbox" for="accept_term">
  73.  
  74. <input type="checkbox"
  75. name="accept_term"
  76. id="accept_term"
  77. value="1"
  78. class="validate[required] form-check-input<?php echo $this->bootstrapHelper->getFrameworkClass('uk-checkbox', 1); ?>"
  79. data-errormessage="<?php echo Text::_('EB_ACCEPT_TERMS'); ?>" />
  80.  
  81. <?php echo Text::_('EB_ACCEPT'); ?>
  82.  
  83. <a <?php echo $linkAttrs; ?>
  84. href="<?php echo Route::_($termLink); ?>">
  85. <strong><?php echo Text::_('EB_TERM_AND_CONDITION'); ?></strong>
  86. </a>
  87.  
  88. <?php if ($privacyLink) : ?>
  89.  
  90. <?php echo ' ' . Text::_('+') . ' '; ?>
  91.  
  92. <a <?php echo $privacyAttrs; ?>
  93. href="<?php echo Route::_($privacyLink); ?>">
  94. <strong><?php echo Text::_('EB_PRIVACY_POLICY'); ?></strong>
  95. </a>
  96.  
  97. <?php endif; ?>
  98.  
  99. </label>
  100.  
  101. </div>
  102.  
  103. </div>
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment