Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- defined('_JEXEC') or die;
- use Joomla\CMS\Language\Text;
- use Joomla\CMS\Router\Route;
- /**
- * Layout variables
- * -----------------
- * @var string $controlGroupClass
- * @var string $controlLabelClass
- * @var string $controlsClass
- * @var int $articleId
- */
- /* Terms link */
- $termLink = EventbookingHelperHtml::getArticleUrl($articleId);
- if (!$termLink)
- {
- return;
- }
- /* Terms popup / new window */
- if ($this->config->open_article_on_new_window)
- {
- $linkAttrs = 'target="_blank"';
- }
- else
- {
- $linkAttrs = 'class="eb-colorbox-term"';
- }
- /* Privacy link */
- $privacyLink = '';
- if ($this->config->show_privacy_policy_checkbox)
- {
- if ($this->config->privacy_policy_url)
- {
- $privacyLink = $this->config->privacy_policy_url;
- }
- elseif ($this->config->privacy_policy_article_id > 0)
- {
- $privacyLink = EventbookingHelperHtml::getArticleUrl($this->config->privacy_policy_article_id);
- }
- }
- /* Privacy popup / new window */
- if ($privacyLink)
- {
- if ($this->config->privacy_policy_url || $this->config->open_article_on_new_window)
- {
- $privacyAttrs = 'target="_blank"';
- }
- else
- {
- $privacyAttrs = 'class="eb-colorbox-privacy-policy eb-colorbox-term"';
- }
- }
- ?>
- <div class="<?php echo $controlGroupClass; ?> eb-terms-and-conditions-container">
- <div class="<?php echo $controlLabelClass; ?>">
- <?php echo Text::_('EB_TERM_AND_CONDITION'); ?> <span class="required">*</span>
- </div>
- <div class="<?php echo $controlsClass; ?>">
- <label class="checkbox" for="accept_term">
- <input type="checkbox"
- name="accept_term"
- id="accept_term"
- value="1"
- class="validate[required] form-check-input<?php echo $this->bootstrapHelper->getFrameworkClass('uk-checkbox', 1); ?>"
- data-errormessage="<?php echo Text::_('EB_ACCEPT_TERMS'); ?>" />
- <?php echo Text::_('EB_ACCEPT'); ?>
- <a <?php echo $linkAttrs; ?>
- href="<?php echo Route::_($termLink); ?>">
- <strong><?php echo Text::_('EB_TERM_AND_CONDITION'); ?></strong>
- </a>
- <?php if ($privacyLink) : ?>
- <?php echo ' ' . Text::_('+') . ' '; ?>
- <a <?php echo $privacyAttrs; ?>
- href="<?php echo Route::_($privacyLink); ?>">
- <strong><?php echo Text::_('EB_PRIVACY_POLICY'); ?></strong>
- </a>
- <?php endif; ?>
- </label>
- </div>
- </div>
Advertisement