| 1 |
<?php |
| 2 |
|
| 3 |
use cybot\cookiebot\settings\templates\Header; |
| 4 |
use cybot\cookiebot\settings\templates\Legacy_Settings; |
| 5 |
use cybot\cookiebot\settings\templates\Main_Tabs; |
| 6 |
|
| 7 |
/** |
| 8 |
* @var string $cbid |
| 9 |
* @var bool $is_ms |
| 10 |
* @var string $network_cbid |
| 11 |
* @var string $ruleset_id |
| 12 |
*/ |
| 13 |
|
| 14 |
$header = new Header(); |
| 15 |
$main_tabs = new Main_Tabs(); |
| 16 |
|
| 17 |
// phpcs:ignore WordPress.Security.NonceVerification.Recommended |
| 18 |
$active_tab = ! empty( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : false; |
| 19 |
|
| 20 |
$header->display(); |
| 21 |
?> |
| 22 |
|
| 23 |
<div class="cb-body"> |
| 24 |
<div class="cb-wrapper"> |
| 25 |
<?php $main_tabs->display( 'settings' ); ?> |
| 26 |
<div class="cb-main__content"> |
| 27 |
<form method="post" action="options.php"> |
| 28 |
<?php settings_fields( 'cookiebot' ); ?> |
| 29 |
<?php do_settings_sections( 'cookiebot' ); ?> |
| 30 |
<div class="cb-settings__header"> |
| 31 |
<h1 class="cb-main__page_title"><?php esc_html_e( 'Settings', 'cookiebot' ); ?></h1> |
| 32 |
</div> |
| 33 |
|
| 34 |
<div class="cb-settings__tabs"> |
| 35 |
</div> |
| 36 |
|
| 37 |
<div class="cb-settings__tabs__content"> |
| 38 |
<div class="cb-settings__tabs__content--item active-item" id="general-settings"> |
| 39 |
<div class="cb-settings__config__item"> |
| 40 |
<div class="cb-settings__config__content"> |
| 41 |
<h3 class="cb-settings__config__subtitle"> |
| 42 |
<?php esc_html_e( 'Connect your account', 'cookiebot' ); ?> |
| 43 |
</h3> |
| 44 |
<p class="cb-general__info__text"> |
| 45 |
<?php esc_html_e( 'Enter the ID of your account to quickly connect it with the plugin.', 'cookiebot' ); ?> |
| 46 |
</p> |
| 47 |
|
| 48 |
<div class="cb-general__info__text"> |
| 49 |
<a href="https://support.usercentrics.com/hc/en-us/articles/18097606499100-What-is-a-Settings-ID-and-where-can-I-find-it" |
| 50 |
target="_blank" class="cb-btn cb-link-btn" rel="noopener"> |
| 51 |
<?php esc_html_e( 'How to find your Usercentrics Settings ID', 'cookiebot' ); ?> |
| 52 |
</a> |
| 53 |
</div> |
| 54 |
<div class="cb-general__info__text"> |
| 55 |
<a href="https://support.cookiebot.com/hc/en-us/articles/4405643234194-Your-CBID-or-Domain-group-ID-and-where-to-find-it" |
| 56 |
target="_blank" class="cb-btn cb-link-btn" rel="noopener"> |
| 57 |
<?php esc_html_e( 'How to find your Cookiebot CMP Domain Group ID', 'cookiebot' ); ?> |
| 58 |
</a> |
| 59 |
</div> |
| 60 |
</div> |
| 61 |
<div class="cb-settings__config__data"> |
| 62 |
<div class="cb-settings__config__data__inner"> |
| 63 |
<h3 class="cb-settings__data__subtitle"> |
| 64 |
<?php esc_html_e( 'Settings ID or Domain Group ID', 'cookiebot' ); ?> |
| 65 |
</h3> |
| 66 |
<div class="cookiebot-cbid-container"> |
| 67 |
<div class="cookiebot-cbid-input"> |
| 68 |
<input placeholder="9, 14 or 36 characters" |
| 69 |
type="text" id="cookiebot-cbid" class="initial-cbid-setup" |
| 70 |
name="cookiebot-cbid" |
| 71 |
value="<?php echo esc_attr( $cbid ); ?>"/> |
| 72 |
<div class="cookiebot-cbid-check <?php echo $cbid ? 'check-pass' : ''; ?>"></div> |
| 73 |
</div> |
| 74 |
<?php submit_button( esc_html__( 'Connect account', 'cookiebot' ), 'disabled' ); ?> |
| 75 |
<div class="cookiebot-cbid-error hidden" style="color: #d63638; margin-top: 8px; font-size: 14px;"> |
| 76 |
<?php esc_html_e( 'Invalid ID length. Please enter a Settings ID (9 or 14 characters) or Domain Group ID (36 characters).', 'cookiebot' ); ?> |
| 77 |
</div> |
| 78 |
</div> |
| 79 |
</div> |
| 80 |
</div> |
| 81 |
</div> |
| 82 |
<div id="cookiebot-ruleset-id-selector" class="cb-settings__config__item hidden"> |
| 83 |
<div class="cb-settings__config__content"> |
| 84 |
<p class="cb-general__info__text"> |
| 85 |
<?php esc_html_e( 'Let us know if your account is set for compliance with a single privacy law (e.g. GDPR) or multiple laws (e.g. GDPR and CCPA) based on user\'s location. The default is a single privacy law, so this is likely your setting unless modified.', 'cookiebot' ); ?> |
| 86 |
</p> |
| 87 |
</div> |
| 88 |
<div class="cb-settings__config__data"> |
| 89 |
<div class="cb-settings__config__data__inner"> |
| 90 |
<h3 class="cb-settings__data__subtitle"> |
| 91 |
<?php esc_html_e( 'Your current account setup:', 'cookiebot' ); ?> |
| 92 |
</h3> |
| 93 |
<label class="recommended-item"> |
| 94 |
<input <?php checked( 'settings', $ruleset_id ); ?> |
| 95 |
type="radio" |
| 96 |
name="cookiebot-ruleset-id" |
| 97 |
value="settings"/> |
| 98 |
<?php esc_html_e( 'Compliance with one privacy law', 'cookiebot' ); ?> |
| 99 |
</label> |
| 100 |
<label> |
| 101 |
<input <?php checked( 'ruleset', $ruleset_id ); ?> |
| 102 |
type="radio" |
| 103 |
name="cookiebot-ruleset-id" |
| 104 |
value="ruleset"/> |
| 105 |
<?php esc_html_e( 'Compliance with multiple privacy laws (geolocation)', 'cookiebot' ); ?> |
| 106 |
</label> |
| 107 |
</div> |
| 108 |
</div> |
| 109 |
</div> |
| 110 |
</div> |
| 111 |
</div> |
| 112 |
<?php |
| 113 |
$legacy_settings = new Legacy_Settings(); |
| 114 |
$legacy_settings->display(); |
| 115 |
?> |
| 116 |
</form> |
| 117 |
</div> |
| 118 |
</div> |
| 119 |
</div> |
| 120 |
|