prior-consent
1 year ago
templates
1 year ago
dashboard-page-old.php
1 year ago
dashboard-page.php
1 year ago
network-settings-page.php
1 year ago
settings-page.php
1 year ago
support-page.php
1 year ago
dashboard-page.php
464 lines
| 1 | <?php |
| 2 | |
| 3 | use cybot\cookiebot\settings\templates\Header; |
| 4 | use cybot\cookiebot\settings\templates\Main_Tabs; |
| 5 | use cybot\cookiebot\settings\pages\Settings_Page; |
| 6 | use function cybot\cookiebot\lib\cookiebot_is_trial_expired; |
| 7 | use function cybot\cookiebot\lib\cookiebot_is_upgraded; |
| 8 | |
| 9 | /** |
| 10 | * @var array $template_args Array containing all template variables |
| 11 | */ |
| 12 | |
| 13 | $header = new Header(); |
| 14 | $main_tabs = new Main_Tabs(); |
| 15 | |
| 16 | $header->display(); |
| 17 | ?> |
| 18 | |
| 19 | |
| 20 | <div class="cb-body"> |
| 21 | |
| 22 | <!-- Banner container for proper alignment --> |
| 23 | <div class="banner-container"> |
| 24 | <!-- Trial expiration notice --> |
| 25 | <?php |
| 26 | $trial_expired = cookiebot_is_trial_expired(); |
| 27 | $upgraded = cookiebot_is_upgraded(); |
| 28 | if ( $trial_expired && ! $upgraded ) : |
| 29 | ?> |
| 30 | <div class="header-top-banners trial-expired-banner"> |
| 31 | <div class="banner-content"> |
| 32 | <img src="<?php echo \esc_url( CYBOT_COOKIEBOT_PLUGIN_URL . 'assets/img/icons/clock-icon.svg' ); ?>" |
| 33 | alt="Clock Icon"> |
| 34 | <div> |
| 35 | <h3><?php echo esc_html__( 'Your premium trial is over', 'cookiebot' ); ?></h3> |
| 36 | <p> |
| 37 | <?php echo esc_html__( 'Your trial has ended, and advanced features are now disabled. You can still use your banner on the Free plan with a 1,000-session limit. Upgrade to Premium for a higher limit and full access to premium features.', 'cookiebot' ); ?> |
| 38 | </p> |
| 39 | </div> |
| 40 | </div> |
| 41 | <div class="upgrade-expired-trial"> |
| 42 | <a href="https://account.usercentrics.eu/subscription/<?php echo isset( $template_args['user_data']['subscriptions']['active']['subscription_id'] ) ? esc_attr( $template_args['user_data']['subscriptions']['active']['subscription_id'] ) . '/' : ''; ?>manage" target="_blank" style="text-decoration: none; color: inherit;"> |
| 43 | <h3><?php echo esc_html__( 'Upgrade now', 'cookiebot' ); ?> <span class="upgrade-chevron">›</span></h3> |
| 44 | </a> |
| 45 | </div> |
| 46 | </div> |
| 47 | <?php endif; ?> |
| 48 | |
| 49 | <!-- Banner connected notice --> |
| 50 | <?php if ( ! empty( $template_args['cbid'] ) && empty( $template_args['user_data'] ) ) : ?> |
| 51 | <div class="header-top-banners connected-banner"> |
| 52 | <div class="banner-content"> |
| 53 | <img src="<?php echo \esc_url( CYBOT_COOKIEBOT_PLUGIN_URL . 'assets/img/icons/check-green.svg' ); ?>" |
| 54 | alt="Check Icon"> |
| 55 | <div> |
| 56 | <h3><?php echo esc_html__( 'Your banner is connected!', 'cookiebot' ); ?></h3> |
| 57 | <p style="text-wrap: nowrap;"> |
| 58 | <?php echo esc_html__( 'Everything works as before. Manage your banner in the', 'cookiebot' ); ?> |
| 59 | <a href="<?php echo esc_url( $template_args['cookiebot_admin_link'] ); ?>" target="_blank"><?php echo esc_html__( 'Cookiebot Manager', 'cookiebot' ); ?></a> |
| 60 | <?php echo esc_html__( 'or', 'cookiebot' ); ?> |
| 61 | <a href="<?php echo esc_url( $template_args['uc_admin_link'] ); ?>" target="_blank"><?php echo esc_html__( 'Usercentrics Admin', 'cookiebot' ); ?></a>. |
| 62 | </p> |
| 63 | </div> |
| 64 | </div> |
| 65 | </div> |
| 66 | <?php endif; ?> |
| 67 | |
| 68 | <!-- Banner is live notice --> |
| 69 | <?php |
| 70 | $banner_dismissed = get_option( 'cookiebot_banner_live_dismissed', false ); |
| 71 | |
| 72 | if ( ! empty( $template_args['cbid'] ) && ! empty( $template_args['user_data'] ) && ! $banner_dismissed ) : |
| 73 | ?> |
| 74 | <div class="header-top-banners banner-live-banner" id="banner-live-notice"> |
| 75 | <div class="banner-content"> |
| 76 | <img src="<?php echo \esc_url( CYBOT_COOKIEBOT_PLUGIN_URL . 'assets/img/icons/check-white.svg' ); ?>" |
| 77 | alt="Check Icon"> |
| 78 | <div> |
| 79 | <h3>Well done! Your <a href="<?php echo esc_url( site_url() ); ?>" target="_blank" class="banner-live-link">banner is live</a>.</h3> |
| 80 | <p> |
| 81 | <?php echo esc_html__( 'If you\'ve signed up or logged in for the first time, your banner may take a few seconds to load on your website.', 'cookiebot' ); ?> |
| 82 | </p> |
| 83 | </div> |
| 84 | </div> |
| 85 | <button class="banner-close-btn" aria-label="Close banner" id="banner-close-btn"> |
| 86 | <span aria-hidden="true">×</span> |
| 87 | </button> |
| 88 | </div> |
| 89 | <?php endif; ?> |
| 90 | </div> |
| 91 | |
| 92 | <div class="cb-wrapper"> |
| 93 | <?php $main_tabs->display( 'dashboard' ); ?> |
| 94 | |
| 95 | <div class="dashboard-grid <?php echo ! empty( $template_args['cbid'] ) ? 'has-cbid' : ''; ?>"> |
| 96 | |
| 97 | <!-- Main Content Area --> |
| 98 | <div class="dashboard-grid-row"> |
| 99 | <div class="gray-box"> |
| 100 | <div class="header-section-no-margin"> |
| 101 | <img src="<?php echo \esc_url( CYBOT_COOKIEBOT_PLUGIN_URL . 'assets/img/icons/set-up-icon.svg' ); ?>" alt="Usercentrics Logo"> |
| 102 | <?php if ( ! empty( $template_args['cbid'] ) && empty( $template_args['user_data'] ) ) : ?> |
| 103 | <h1><?php echo \esc_html__( 'Simplify your banner management', 'cookiebot' ); ?></h1> |
| 104 | <?php else : ?> |
| 105 | <h1><?php echo \esc_html__( 'Set up your consent banner', 'cookiebot' ); ?></h1> |
| 106 | <?php endif; ?> |
| 107 | </div> |
| 108 | <div class="header-section"> |
| 109 | <?php if ( empty( $template_args['cbid'] ) && empty( $template_args['user_data'] ) ) : ?> |
| 110 | <p class="subtitle"> |
| 111 | <?php echo esc_html__( 'Get your site GDPR-compliant in', 'cookiebot' ); ?> |
| 112 | <strong><?php echo esc_html__( 'just a few clicks.', 'cookiebot' ); ?></strong> |
| 113 | <?php echo esc_html__( 'Enter your email, verify it, and create your password.', 'cookiebot' ); ?> |
| 114 | </p> |
| 115 | <?php endif; ?> |
| 116 | <?php if ( ! empty( $template_args['cbid'] ) && empty( $template_args['user_data'] ) ) : ?> |
| 117 | <p class="subtitle"> |
| 118 | <?php echo esc_html__( 'Your setup is good to go - but we\'re making banner control even easier inside WordPress.', 'cookiebot' ); ?> |
| 119 | <strong><?php echo esc_html__( 'Get access to new features', 'cookiebot' ); ?></strong> |
| 120 | <?php echo esc_html__( 'by updating your banner today.', 'cookiebot' ); ?> |
| 121 | </p> |
| 122 | <?php endif; ?> |
| 123 | </div> |
| 124 | |
| 125 | |
| 126 | <!-- Steps Container --> |
| 127 | <div class="steps-container"> |
| 128 | <!-- Activate your banner step --> |
| 129 | <div class="step-box <?php echo ! empty( $template_args['cbid'] ) ? 'completed' : ''; ?>"> |
| 130 | <div class="step-row"> |
| 131 | |
| 132 | <?php if ( ! empty( $template_args['cbid'] ) && empty( $template_args['user_data'] ) ) : ?> |
| 133 | <div class="step-icon"> |
| 134 | <div class="empty-circle"></div> |
| 135 | </div> |
| 136 | <div class="step-content"> |
| 137 | <h2><?php echo \esc_html__( 'Unlock new banner', 'cookiebot' ); ?></h2> |
| 138 | </div> |
| 139 | <?php endif; ?> |
| 140 | |
| 141 | <?php if ( empty( $template_args['cbid'] ) && empty( $template_args['user_data'] ) ) : ?> |
| 142 | <div class="step-icon"> |
| 143 | <div class="empty-circle"></div> |
| 144 | </div> |
| 145 | <div class="step-content"> |
| 146 | <h2><?php echo \esc_html__( 'Activate your banner', 'cookiebot' ); ?></h2> |
| 147 | </div> |
| 148 | <?php endif; ?> |
| 149 | |
| 150 | <?php if ( ! empty( $template_args['cbid'] ) && ! empty( $template_args['user_data'] ) ) : ?> |
| 151 | <div class="step-icon"> |
| 152 | <img src="<?php echo \esc_url( CYBOT_COOKIEBOT_PLUGIN_URL . 'assets/img/icons/check-mark.svg' ); ?>" alt="Checkmark"> |
| 153 | </div> |
| 154 | <div class="step-content"> |
| 155 | <h2><?php echo \esc_html__( 'Activate your banner', 'cookiebot' ); ?></h2> |
| 156 | </div> |
| 157 | <span class="done-status">Done!</span> |
| 158 | <?php endif; ?> |
| 159 | |
| 160 | </div> |
| 161 | |
| 162 | <?php if ( empty( $template_args['user_data'] ) ) : ?> |
| 163 | <div class="banner-preview-container"> |
| 164 | <div class="divider"></div> |
| 165 | <?php if ( ! empty( $template_args['cbid'] ) && empty( $template_args['user_data'] ) ) : ?> |
| 166 | <p class="step-description"> |
| 167 | <?php echo esc_html__( 'We\'ve simplified privacy compliance for you. Save time with auto-setup, website scanning for data processing services, and consent-first blocking.', 'cookiebot' ); ?> |
| 168 | </p> |
| 169 | <?php else : ?> |
| 170 | <p class="step-description"> |
| 171 | <?php echo esc_html__( 'Activate your banner in seconds with easy auto-setup, smart data processing services detection, and consent-first blocking for automated privacy compliance.', 'cookiebot' ); ?> |
| 172 | </p> |
| 173 | <?php endif; ?> |
| 174 | <div class="banner-images"> |
| 175 | <?php |
| 176 | $banner1_url = CYBOT_COOKIEBOT_PLUGIN_URL . 'assets/img/banner-getting-started1.png'; |
| 177 | $banner2_url = CYBOT_COOKIEBOT_PLUGIN_URL . 'assets/img/banner-getting-started2.png'; |
| 178 | $arrow_url = CYBOT_COOKIEBOT_PLUGIN_URL . 'assets/img/banner-arrow.png'; |
| 179 | ?> |
| 180 | <img src="<?php echo \esc_url( $banner1_url ); ?>" |
| 181 | alt="Banner Preview 1" |
| 182 | class="banner-image"> |
| 183 | <img src="<?php echo \esc_url( $banner2_url ); ?>" |
| 184 | alt="Banner Preview 2" |
| 185 | class="banner-image"> |
| 186 | </div> |
| 187 | <div class="activate-container"> |
| 188 | <button id="get-started-button" class="cb-btn cb-primary-btn cb-get-started-btn"> |
| 189 | <?php echo esc_html__( 'Get Started', 'cookiebot' ); ?> |
| 190 | </button> |
| 191 | <img src="<?php echo \esc_url( $arrow_url ); ?>" |
| 192 | alt="arrow" |
| 193 | class="banner-arrow"> |
| 194 | </div> |
| 195 | |
| 196 | <?php if ( ! empty( $template_args['cbid'] ) ) : ?> |
| 197 | <div class="note-text"> |
| 198 | <img class="note-icon" src="<?php echo esc_url( CYBOT_COOKIEBOT_PLUGIN_URL . 'assets/img/icons/info.svg' ); ?>" /> |
| 199 | <span>Note: A new account comes with a new banner, which will replace your existing one.</span> |
| 200 | </div> |
| 201 | <?php endif; ?> |
| 202 | |
| 203 | </div> |
| 204 | <?php endif; ?> |
| 205 | </div> |
| 206 | |
| 207 | <!-- Scan website step - only show when CBID exists --> |
| 208 | <?php if ( ! empty( $template_args['user_data'] ) ) : ?> |
| 209 | <div class="step-box"> |
| 210 | <div class="step-row"> |
| 211 | <div class="step-icon"> |
| 212 | <?php if ( $template_args['scan_status'] === 'DONE' ) : ?> |
| 213 | <img src="<?php echo \esc_url( CYBOT_COOKIEBOT_PLUGIN_URL . 'assets/img/icons/check-mark.svg' ); ?>" alt="Checkmark"> |
| 214 | <?php else : ?> |
| 215 | <div class="empty-circle"></div> |
| 216 | <?php endif; ?> |
| 217 | </div> |
| 218 | <div class="step-content"> |
| 219 | <h2><?php echo \esc_html__( 'Scan website', 'cookiebot' ); ?></h2> |
| 220 | </div> |
| 221 | <div class="step-status"> |
| 222 | <?php |
| 223 | switch ( $template_args['scan_status'] ) { |
| 224 | case 'IN_PROGRESS': |
| 225 | ?> |
| 226 | <span class="in-progress-status"> |
| 227 | <img src="<?php echo \esc_url( CYBOT_COOKIEBOT_PLUGIN_URL . 'assets/img/icons/clock-icon.svg' ); ?>" alt="Clock Icon"> |
| 228 | In Progress |
| 229 | </span> |
| 230 | <?php |
| 231 | break; |
| 232 | case 'DONE': |
| 233 | ?> |
| 234 | <span class="done-status">Done!</span> |
| 235 | <?php |
| 236 | break; |
| 237 | default: |
| 238 | ?> |
| 239 | <span class="failed-status"> |
| 240 | Failed |
| 241 | </span> |
| 242 | <?php |
| 243 | } |
| 244 | ?> |
| 245 | <?php if ( $template_args['scan_status'] !== 'DONE' ) : ?> |
| 246 | <button class="expand-toggle" aria-expanded="false" aria-controls="scan-details"> |
| 247 | <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="arrow-icon"> |
| 248 | <path d="M7 10l5 5 5-5z" fill="#6B7280" /> |
| 249 | </svg> |
| 250 | </button> |
| 251 | <?php endif; ?> |
| 252 | </div> |
| 253 | </div> |
| 254 | |
| 255 | <!-- Scan details section (initially hidden) --> |
| 256 | <?php if ( $template_args['scan_status'] !== 'DONE' ) : ?> |
| 257 | <div id="scan-details" class="scan-details" style="display: block;"> |
| 258 | <div class="divider"></div> |
| 259 | <p class="scan-message"> |
| 260 | <?php if ( $template_args['scan_status'] !== 'IN_PROGRESS' ) : ?> |
| 261 | Oops! We couldn't start or complete your scan! Try initiating a scan manually via the <a href="https://admin.usercentrics.eu/#/v3/service-settings/dps-scanner?settingsId=<?php echo esc_attr( $template_args['cbid'] ); ?>" target="_blank">Admin Interface</a>. |
| 262 | <?php else : ?> |
| 263 | We're scanning your website for data processing services. They should appear in 10 minutes, but it may take up to 24 hours. For more information, please review your <a href="https://admin.usercentrics.eu/#/v3/service-settings/dps-scanner?settingsId=<?php echo esc_attr( $template_args['cbid'] ); ?>" target="_blank">service settings</a>. |
| 264 | <?php endif; ?> |
| 265 | </p> |
| 266 | </div> |
| 267 | <?php endif; ?> |
| 268 | </div> |
| 269 | <?php endif; ?> |
| 270 | |
| 271 | <!-- Upgrade your plan step --> |
| 272 | <?php if ( ! empty( $template_args['user_data'] ) ) : ?> |
| 273 | <div class="step-box"> |
| 274 | <div class="step-row"> |
| 275 | <div class="step-icon"> |
| 276 | <?php |
| 277 | $subscription_type = $template_args['subscription']; |
| 278 | $is_upgraded = $subscription_type !== 'Free' && $subscription_type !== 'Premium trial'; |
| 279 | if ( $is_upgraded ) : |
| 280 | ?> |
| 281 | <img src="<?php echo \esc_url( CYBOT_COOKIEBOT_PLUGIN_URL . 'assets/img/icons/check-mark.svg' ); ?>" alt="Checkmark"> |
| 282 | <?php else : ?> |
| 283 | <div class="empty-circle"></div> |
| 284 | <?php endif; ?> |
| 285 | </div> |
| 286 | <div class="step-content"> |
| 287 | <h2><?php echo \esc_html__( 'Upgrade your plan', 'cookiebot' ); ?></h2> |
| 288 | </div> |
| 289 | <?php if ( $is_upgraded ) : ?> |
| 290 | <span class="done-status">Done!</span> |
| 291 | <?php else : ?> |
| 292 | <div class="step-status"> |
| 293 | <div class="lightning-badge"> |
| 294 | <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 295 | <path d="M7.58333 0.583344L1.75 8.16668H7L6.41667 13.4167L12.25 5.83334H7L7.58333 0.583344Z" fill="#0047FF" /> |
| 296 | </svg> |
| 297 | </div> |
| 298 | </div> |
| 299 | <?php endif; ?> |
| 300 | </div> |
| 301 | |
| 302 | <!-- Upgrade details section --> |
| 303 | <?php if ( $is_upgraded ) : ?> |
| 304 | <div class="upgrade-details"> |
| 305 | <div class="divider"></div> |
| 306 | <div class="subscription-info"> |
| 307 | <div> |
| 308 | <div class="upgrade-header"> |
| 309 | <img src="<?php echo \esc_url( CYBOT_COOKIEBOT_PLUGIN_URL . 'assets/img/icons/celebration.svg' ); ?>" alt="Celebration" class="celebration-icon"> |
| 310 | <h3>You've upgraded to <span class="plan-name"><?php echo esc_html( $template_args['subscription'] ); ?></span>!</h3> |
| 311 | </div> |
| 312 | <?php if ( isset( $template_args['user_data']['subscriptions']['active']['subscription_id'] ) ) : ?> |
| 313 | <a href="https://account.usercentrics.eu/subscription/<?php echo esc_attr( $template_args['user_data']['subscriptions']['active']['subscription_id'] ); ?>/manage" class="manage-features-link" target="_blank"> |
| 314 | <?php else : ?> |
| 315 | <a href="https://account.usercentrics.eu/subscription/manage" class="manage-features-link" target="_blank"> |
| 316 | <?php endif; ?> |
| 317 | <p>Manage advanced features</p> |
| 318 | </a> |
| 319 | </div> |
| 320 | <?php if ( isset( $template_args['user_data']['subscriptions']['active']['next_billing_date'] ) ) : ?> |
| 321 | <div class="billing-date"> |
| 322 | <img src="<?php echo \esc_url( CYBOT_COOKIEBOT_PLUGIN_URL . 'assets/img/icons/calendar.svg' ); ?>" alt="Calendar" class="calendar-icon"> |
| 323 | <h3><?php echo esc_html__( 'Next billing date: ', 'cookiebot' ) . esc_html( gmdate( 'd/m/Y', strtotime( $template_args['user_data']['subscriptions']['active']['next_billing_date'] ) ) ); ?></h3> |
| 324 | </div> |
| 325 | <?php endif; ?> |
| 326 | <div class="manage-subscription"> |
| 327 | <button id="manage-subscription-button" class="cb-btn cb-primary-btn" onclick="window.open('https://account.usercentrics.eu/subscription/<?php echo isset( $template_args['user_data']['subscriptions']['active']['subscription_id'] ) ? esc_attr( $template_args['user_data']['subscriptions']['active']['subscription_id'] ) . '/' : ''; ?>manage', '_blank')"> |
| 328 | <?php echo esc_html__( 'Manage subscription', 'cookiebot' ); ?> |
| 329 | </button> |
| 330 | </div> |
| 331 | </div> |
| 332 | </div> |
| 333 | <?php else : ?> |
| 334 | <div class="upgrade-details"> |
| 335 | <div class="divider"></div> |
| 336 | <p class="upgrade-intro">Upgrade to unlock these premium benefits:</p> |
| 337 | |
| 338 | <ul class="upgrade-features"> |
| 339 | <li><strong>Match your consent banner to your brand</strong> with advanced customization options.</li> |
| 340 | <li><strong>Adapt your banner to increase opt-ins</strong> using our consent analytics data.</li> |
| 341 | <li><strong>Benefit from higher session limits</strong> and maintain privacy compliance as your traffic grows.</li> |
| 342 | </ul> |
| 343 | |
| 344 | <p class="ready-text">Ready to take your consent experience to the next level?</p> |
| 345 | |
| 346 | <div class="upgrade-container"> |
| 347 | <button id="upgrade-now-button" class="cb-btn cb-primary-btn" onclick="window.open('https://account.usercentrics.eu/subscription/<?php echo isset( $template_args['user_data']['subscriptions']['active']['subscription_id'] ) ? esc_attr( $template_args['user_data']['subscriptions']['active']['subscription_id'] ) . '/' : ''; ?>manage', '_blank')"> |
| 348 | <?php echo esc_html__( 'Upgrade now', 'cookiebot' ); ?> |
| 349 | </button> |
| 350 | </div> |
| 351 | </div> |
| 352 | <?php endif; ?> |
| 353 | </div> |
| 354 | <?php endif; ?> |
| 355 | </div> |
| 356 | </div> |
| 357 | |
| 358 | <!-- Right Side - Banner Control (only show when CBID exists) --> |
| 359 | <?php if ( $template_args['user_data'] ) : ?> |
| 360 | <div class="gray-box-overview"> |
| 361 | <div class="header-section"> |
| 362 | <div> |
| 363 | <div class="top-row"> |
| 364 | <a href="<?php echo esc_url( site_url() ); ?>" target="_blank" class="dashboard-link"><?php echo esc_html__( 'Preview', 'cookiebot' ); ?></a> |
| 365 | <span class="free-badge"><?php echo esc_html( $template_args['subscription'] ); ?></span> |
| 366 | </div> |
| 367 | <h1><?php echo esc_html__( 'Banner control', 'cookiebot' ); ?></h1> |
| 368 | <p class="subtitle"><?php echo esc_html__( 'Choose and control your banner settings and display options.', 'cookiebot' ); ?></p> |
| 369 | </div> |
| 370 | </div> |
| 371 | |
| 372 | <div class="banner-options"> |
| 373 | <!-- Show banner on site option --> |
| 374 | <div class="option-group"> |
| 375 | <span class="option-label"><?php echo esc_html__( 'Show banner on site', 'cookiebot' ); ?></span> |
| 376 | <div class="option-controls"> |
| 377 | <div class="toggle-switch"> |
| 378 | <input type="checkbox" id="cookiebot-banner-enabled" class="toggle-input" |
| 379 | value="1" |
| 380 | <?php |
| 381 | checked( 1, $template_args['banner_enabled'] === '1' ); |
| 382 | ?> |
| 383 | /> |
| 384 | <label for="cookiebot-banner-enabled" class="toggle-label"></label> |
| 385 | </div> |
| 386 | <div class="label-wrapper status-badge <?php echo ! empty( $template_args['cbid'] ) && $template_args['banner_enabled'] === '1' ? 'active' : ' inactive'; ?>" id="cookiebot-banner-badge"> |
| 387 | <div class="label-2"> |
| 388 | <?php echo ! empty( $template_args['cbid'] ) && $template_args['banner_enabled'] === '1' ? esc_html__( 'Active', 'cookiebot' ) : esc_html__( 'Inactive', 'cookiebot' ); ?> |
| 389 | </div> |
| 390 | </div> |
| 391 | </div> |
| 392 | </div> |
| 393 | |
| 394 | <div class="option-divider"></div> |
| 395 | |
| 396 | <!-- Google Consent Mode option --> |
| 397 | <div class="option-group"> |
| 398 | <div class="option-label-wrapper"> |
| 399 | <span class="option-label"><?php echo esc_html__( 'Google Consent Mode', 'cookiebot' ); ?></span> |
| 400 | |
| 401 | <div class="tooltip"> |
| 402 | <span class="tooltiptext">Enable Google Consent Mode integration within your Usercentrics Cookiebot WordPress Plugin.</span> |
| 403 | <img class="img" src="<?php echo esc_url( CYBOT_COOKIEBOT_PLUGIN_URL . 'assets/img/icons/info.svg' ); ?>" /> |
| 404 | </div> |
| 405 | |
| 406 | </div> |
| 407 | <div class="option-controls"> |
| 408 | <div class="toggle-switch"> |
| 409 | <input type="checkbox" id="cookiebot-gcm" class="toggle-input" |
| 410 | value="1" |
| 411 | <?php |
| 412 | checked( 1, $template_args['gcm_enabled'] === '1' ); |
| 413 | ?> |
| 414 | /> |
| 415 | <label for="cookiebot-gcm" class="toggle-label"></label> |
| 416 | </div> |
| 417 | |
| 418 | <div class="label-wrapper status-badge <?php echo ! empty( $template_args['cbid'] ) && $template_args['gcm_enabled'] === '1' ? 'active' : 'inactive'; ?>" id="cookiebot-gcm-badge"> |
| 419 | <div class="label-2"> |
| 420 | <?php echo ! empty( $template_args['cbid'] ) && $template_args['gcm_enabled'] === '1' ? esc_html__( 'Active', 'cookiebot' ) : esc_html__( 'Inactive', 'cookiebot' ); ?> |
| 421 | </div> |
| 422 | </div> |
| 423 | </div> |
| 424 | </div> |
| 425 | |
| 426 | <div class="option-divider"></div> |
| 427 | |
| 428 | <!-- Legal framework option --> |
| 429 | <div class="option-group"> |
| 430 | <span class="option-label"><?php echo esc_html__( 'Legal framework', 'cookiebot' ); ?></span> |
| 431 | <div class="option-controls legal-framework"> |
| 432 | <span class="legal-framework-badge"><?php echo esc_html( $template_args['legal_framework'] ); ?></span> |
| 433 | </div> |
| 434 | </div> |
| 435 | </div> |
| 436 | |
| 437 | <div class="banner-actions"> |
| 438 | <button class="cb-btn customize-banner-btn" onclick="window.open('<?php echo esc_url( $template_args['customize_banner_link'] ); ?>', '_blank')"><?php echo esc_html__( 'Customize banner', 'cookiebot' ); ?></button> |
| 439 | <a href="<?php echo esc_url( $template_args['configure_banner_link'] ); ?>" class="configure-link" target="_blank"> |
| 440 | <img class="material-icons" src="<?php echo esc_url( CYBOT_COOKIEBOT_PLUGIN_URL . 'assets/img/icons/link.svg' ); ?>" /> |
| 441 | <?php echo esc_html__( 'How to configure your banner', 'cookiebot' ); ?> |
| 442 | </a> |
| 443 | </div> |
| 444 | </div> |
| 445 | <?php endif; ?> |
| 446 | </div> |
| 447 | |
| 448 | <!-- Help text (only show when user_data doesn't exist) --> |
| 449 | <?php if ( empty( $template_args['user_data'] ) ) : ?> |
| 450 | <div> |
| 451 | <div class="cb-general__info__text"> |
| 452 | <span class="note-text">Need to manage an existing Cookiebot or Usercentrics account?</span> |
| 453 | |
| 454 | <a href="<?php echo esc_url( add_query_arg( 'page', Settings_Page::ADMIN_SLUG, admin_url( 'admin.php' ) ) ); ?>" |
| 455 | class="note-link"> |
| 456 | <span><?php esc_html_e( 'Go to Settings', 'cookiebot' ); ?></span> |
| 457 | </a> |
| 458 | </div> |
| 459 | </div> |
| 460 | <?php endif; ?> |
| 461 | </div> |
| 462 | </div> |
| 463 | </div> |
| 464 |