1085 lines
61 KiB
PHP
1085 lines
61 KiB
PHP
|
|
<?php
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* Provide a admin area view for the plugin
|
|||
|
|
*
|
|||
|
|
* This file is used to markup the admin-facing aspects of the plugin.
|
|||
|
|
*
|
|||
|
|
* @link http://secureprivacy.ai/
|
|||
|
|
* @since 1.0.0
|
|||
|
|
*
|
|||
|
|
* @package Secureprivacy
|
|||
|
|
* @subpackage Secureprivacy/admin/partials
|
|||
|
|
*/
|
|||
|
|
?>
|
|||
|
|
|
|||
|
|
<!-- This file should primarily consist of HTML with a little bit of PHP. -->
|
|||
|
|
<div class="wrap _s" id="page_settings_page" style="display:none;">
|
|||
|
|
|
|||
|
|
|
|||
|
|
<div class="col-sm-9">
|
|||
|
|
<div class="sp-tabs-bar">
|
|||
|
|
<a href="<?php echo admin_url('admin.php?page=dashboard'); ?>" class="customisation"> Dashboard </a>
|
|||
|
|
<a href="<?php echo admin_url('admin.php?page=settings'); ?>" class="customisation active-c"> Settings </a>
|
|||
|
|
<a href="<?php echo admin_url('admin.php?page=banners'); ?>" class="customisation"> Banners </a>
|
|||
|
|
<a href="<?php echo admin_url('admin.php?page=priorConsent'); ?>" class="customisation"> Prior consent </a>
|
|||
|
|
<!-- <a href="<?php echo admin_url('admin.php?page=privacyPolicy'); ?>" class="customisation"> Privacy policy </a> -->
|
|||
|
|
<a href="<?php echo admin_url('admin.php?page=consentTracking'); ?>" class="customisation"> Consent tracking </a>
|
|||
|
|
|
|||
|
|
<span id="loading_span" style="display:none;margin-top:15px;margin-right:15px;" class="pull-right bs-label bg-blue">Loading...</span>
|
|||
|
|
</div>
|
|||
|
|
<div class="clearfix"></div>
|
|||
|
|
<div style="border: solid 1px #dddddd;padding: 15px;background: #fff;">
|
|||
|
|
<form id="settings_page" action="javascript:void(0);">
|
|||
|
|
<h4 class="settings-header">Colors</h4>
|
|||
|
|
<div class="form-horizontal bordered-row" id="settings-color-form">
|
|||
|
|
<div class="form-group" id="color">
|
|||
|
|
<label class="col-sm-3 control-label" style="margin-top: 15px;">
|
|||
|
|
Colors</label>
|
|||
|
|
<div class="col-sm-2">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<div class="text-center">
|
|||
|
|
<small>Background</small>
|
|||
|
|
</div>
|
|||
|
|
<div id="cp1" class="input-group colorpicker-component colorpicker-element">
|
|||
|
|
<input type="text" class="form-control" id="tbxBackgroundColor" value="">
|
|||
|
|
<span class="input-group-addon">
|
|||
|
|
<i style="background-color: ;"></i>
|
|||
|
|
</span>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-sm-2">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<div class="text-center">
|
|||
|
|
<small>Text</small>
|
|||
|
|
</div>
|
|||
|
|
<div id="cp2" class="input-group colorpicker-component colorpicker-element">
|
|||
|
|
<input type="text" class="form-control" id="tbxTextColor" value="">
|
|||
|
|
<span class="input-group-addon">
|
|||
|
|
<i style="background-color: ;"></i>
|
|||
|
|
</span>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-sm-2">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<div class="text-center">
|
|||
|
|
<small>Cancel Button</small>
|
|||
|
|
</div>
|
|||
|
|
<div id="cp3" class="input-group colorpicker-component colorpicker-element">
|
|||
|
|
<input type="text" class="form-control" id="tbxCancelColor" value="">
|
|||
|
|
<span class="input-group-addon">
|
|||
|
|
<i style="background-color: ;"></i>
|
|||
|
|
</span>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-sm-2">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<div class="text-center">
|
|||
|
|
<small>Save Button</small>
|
|||
|
|
</div>
|
|||
|
|
<div id="cp4" class="input-group colorpicker-component colorpicker-element">
|
|||
|
|
<input type="text" class="form-control" id="tbxSaveColor" value="">
|
|||
|
|
<span class="input-group-addon">
|
|||
|
|
<i style="background-color: ;"></i>
|
|||
|
|
</span>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-3 control-label">
|
|||
|
|
Background on banners
|
|||
|
|
</label>
|
|||
|
|
<div class="col-sm-9">
|
|||
|
|
<label class="radio-inline">
|
|||
|
|
<input type="radio" class="pull-left" value="true" name="optBackgroundRadio">No Background</label>
|
|||
|
|
<label class="radio-inline">
|
|||
|
|
<input type="radio" class="pull-left" value="false" name="optBackgroundRadio">Dark Background</label>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-3 control-label">
|
|||
|
|
Logo color on trust badge
|
|||
|
|
</label>
|
|||
|
|
<div class="col-sm-9">
|
|||
|
|
<label class="radio-inline">
|
|||
|
|
<input type="radio" class="pull-left" value="white" name="optLogoRadio">Light</label>
|
|||
|
|
<label class="radio-inline">
|
|||
|
|
<input type="radio" class="pull-left" value="black" name="optLogoRadio">Dark</label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="col-md-12">
|
|||
|
|
<button class="btn_save_settings_page pull-right btn btn-success"> Save changes</button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<h4 class="settings-header" style="margin-top: 60px;" >User Targeting</h4>
|
|||
|
|
<div class="form-horizontal bordered-row" id="settings-target-form">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-3 control-label">
|
|||
|
|
Target audiences
|
|||
|
|
</label>
|
|||
|
|
<div class="col-sm-6">
|
|||
|
|
<select id="country-switch" name="country-switch" class="form-control">
|
|||
|
|
<option value="all">Active for all visitors</option>
|
|||
|
|
<option value="eu">Active for EU visitors only</option>
|
|||
|
|
<option value="none">Inactive for all visitors</option>
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<button id="btn_upgrade_target" class="btn btn-warning" data-container="body" data-toggle="tooltip" title="This feature is only available in paid plans." style="display:none" >Upgrade</button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-12">
|
|||
|
|
<button class="btn_save_settings_page pull-right btn btn-success"> Save changes</button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<h4 class="settings-header" id="languages" style="margin-top: 60px;">Languages</h4>
|
|||
|
|
<div class="example-box-wrapper" style="margin-top: 30px;">
|
|||
|
|
<div class="alert alert-warning" style="display:none;overflow:hidden;" id="btn_multiple_language">
|
|||
|
|
<span style="line-height:34px;">Upgrade your plan to enable multiple language support. <button class="pull-right btn btn-warning">Upgrade</a></span>
|
|||
|
|
</div>
|
|||
|
|
<form class="form-horizontal bordered-row" id="settings-language-form">
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-af">
|
|||
|
|
<input type="checkbox" id="lang-af" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/af.png"> Afrikaans </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-sq">
|
|||
|
|
<input type="checkbox" id="lang-sq" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/sq.png"> Albanian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-am">
|
|||
|
|
<input type="checkbox" id="lang-am" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/am.png"> Amharic </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-ar">
|
|||
|
|
<input type="checkbox" id="lang-ar" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/ar.png"> Arabic </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-hy">
|
|||
|
|
<input type="checkbox" id="lang-hy" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/hy.png"> Armenian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-az">
|
|||
|
|
<input type="checkbox" id="lang-az" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/az.png"> Azerbaijani </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-eu">
|
|||
|
|
<input type="checkbox" id="lang-eu" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/eu.png"> Basque </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-be">
|
|||
|
|
<input type="checkbox" id="lang-be" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/be.png"> Belarusian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-bs">
|
|||
|
|
<input type="checkbox" id="lang-bs" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/bs.png"> Bosnian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-bg">
|
|||
|
|
<input type="checkbox" id="lang-bg" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/bg.png"> Bulgarian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-ca">
|
|||
|
|
<input type="checkbox" id="lang-ca" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/ca.png"> Catalan </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-zh">
|
|||
|
|
<input type="checkbox" id="lang-zh" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/zh.png"> Chinese </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-hr">
|
|||
|
|
<input type="checkbox" id="lang-hr" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/hr.png"> Croatian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-cs">
|
|||
|
|
<input type="checkbox" id="lang-cs" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/cs.png"> Czech </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-da">
|
|||
|
|
<input type="checkbox" id="lang-da" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/da.png"> Danish </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-nl">
|
|||
|
|
<input type="checkbox" id="lang-nl" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/nl.png"> Dutch </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-en">
|
|||
|
|
<input type="checkbox" id="lang-en" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/en.png"> English </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-eo">
|
|||
|
|
<input type="checkbox" id="lang-eo" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/eo.png"> Esperanto </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-et">
|
|||
|
|
<input type="checkbox" id="lang-et" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/et.png"> Estonian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-fi">
|
|||
|
|
<input type="checkbox" id="lang-fi" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/fi.png"> Finnish </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-fr">
|
|||
|
|
<input type="checkbox" id="lang-fr" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/fr.png"> French </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-gl">
|
|||
|
|
<input type="checkbox" id="lang-gl" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/gl.png"> Galician </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-de">
|
|||
|
|
<input type="checkbox" id="lang-de" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/de.png"> German </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-el">
|
|||
|
|
<input type="checkbox" id="lang-el" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/el.png"> Greek, Modern </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-gu">
|
|||
|
|
<input type="checkbox" id="lang-gu" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/gu.png"> Gujarati </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-ht">
|
|||
|
|
<input type="checkbox" id="lang-ht" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/ht.png"> Haitian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-he">
|
|||
|
|
<input type="checkbox" id="lang-he" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/he.png"> Hebrew (modern) </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-hi">
|
|||
|
|
<input type="checkbox" id="lang-hi" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/hi.png"> Hindi </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-hu">
|
|||
|
|
<input type="checkbox" id="lang-hu" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/hu.png"> Hungarian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-id">
|
|||
|
|
<input type="checkbox" id="lang-id" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/id.png"> Indonesian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-ga">
|
|||
|
|
<input type="checkbox" id="lang-ga" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/ga.png"> Irish </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-is">
|
|||
|
|
<input type="checkbox" id="lang-is" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/is.png"> Icelandic </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-it">
|
|||
|
|
<input type="checkbox" id="lang-it" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/it.png"> Italian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-ja">
|
|||
|
|
<input type="checkbox" id="lang-ja" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/ja.png"> Japanese </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-kn">
|
|||
|
|
<input type="checkbox" id="lang-kn" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/kn.png"> Kannada </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-km">
|
|||
|
|
<input type="checkbox" id="lang-km" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/km.png"> Khmer </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-ky">
|
|||
|
|
<input type="checkbox" id="lang-ky" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/ky.png"> Kirghiz, Kyrgyz </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-ko">
|
|||
|
|
<input type="checkbox" id="lang-ko" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/ko.png"> Korean </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-ku">
|
|||
|
|
<input type="checkbox" id="lang-ku" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/ku.png"> Kurdish </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-la">
|
|||
|
|
<input type="checkbox" id="lang-la" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/la.png"> Latin </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-lb">
|
|||
|
|
<input type="checkbox" id="lang-lb" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/lb.png"> Letzeburgesch </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-lt">
|
|||
|
|
<input type="checkbox" id="lang-lt" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/lt.png"> Lithuanian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-lv">
|
|||
|
|
<input type="checkbox" id="lang-lv" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/lv.png"> Latvian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-mk">
|
|||
|
|
<input type="checkbox" id="lang-mk" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/mk.png"> Macedonian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-mg">
|
|||
|
|
<input type="checkbox" id="lang-mg" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/mg.png"> Malagasy </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-ms">
|
|||
|
|
<input type="checkbox" id="lang-ms" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/ms.png"> Malay </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-ml">
|
|||
|
|
<input type="checkbox" id="lang-ml" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/ml.png"> Malayalam </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-mt">
|
|||
|
|
<input type="checkbox" id="lang-mt" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/mt.png"> Maltese </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-mn">
|
|||
|
|
<input type="checkbox" id="lang-mn" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/mn.png"> Mongolian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-no">
|
|||
|
|
<input type="checkbox" id="lang-no" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/no.png"> Norwegian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-pa">
|
|||
|
|
<input type="checkbox" id="lang-pa" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/pa.png"> Panjabi, Punjabi </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-fa">
|
|||
|
|
<input type="checkbox" id="lang-fa" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/fa.png"> Persian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-pl">
|
|||
|
|
<input type="checkbox" id="lang-pl" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/pl.png"> Polish </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-ps">
|
|||
|
|
<input type="checkbox" id="lang-ps" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/ps.png"> Pashto, Pushto </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-pt">
|
|||
|
|
<input type="checkbox" id="lang-pt" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/pt.png"> Portuguese </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-ro">
|
|||
|
|
<input type="checkbox" id="lang-ro" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/ro.png"> Romanian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-ru">
|
|||
|
|
<input type="checkbox" id="lang-ru" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/ru.png"> Russian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-sd">
|
|||
|
|
<input type="checkbox" id="lang-sd" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/sd.png"> Sindhi </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-sm">
|
|||
|
|
<input type="checkbox" id="lang-sm" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/sm.png"> Samoan </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-sr">
|
|||
|
|
<input type="checkbox" id="lang-sr" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/sr.png"> Serbian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-gd">
|
|||
|
|
<input type="checkbox" id="lang-gd" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/gd.png"> Scottish Gaelic </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-sn">
|
|||
|
|
<input type="checkbox" id="lang-sn" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/sn.png"> Shona </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-sk">
|
|||
|
|
<input type="checkbox" id="lang-sk" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/sk.png"> Slovak </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-sl">
|
|||
|
|
<input type="checkbox" id="lang-sl" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/sl.png"> Slovene </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-so">
|
|||
|
|
<input type="checkbox" id="lang-so" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/so.png"> Somali </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-es">
|
|||
|
|
<input type="checkbox" id="lang-es" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/es.png"> Spanish </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box ">
|
|||
|
|
<label for="lang-sv">
|
|||
|
|
<input type="checkbox" id="lang-sv" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/sv.png"> Swedish </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-tg">
|
|||
|
|
<input type="checkbox" id="lang-tg" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/tg.png"> Tajik </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-th">
|
|||
|
|
<input type="checkbox" id="lang-th" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/th.png"> Thai </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-tr">
|
|||
|
|
<input type="checkbox" id="lang-tr" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/tr.png"> Turkish </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-uk">
|
|||
|
|
<input type="checkbox" id="lang-uk" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/uk.png"> Ukrainian </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-ur">
|
|||
|
|
<input type="checkbox" id="lang-ur" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/ur.png"> Urdu </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-uz">
|
|||
|
|
<input type="checkbox" id="lang-uz" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/uz.png"> Uzbek </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-vi">
|
|||
|
|
<input type="checkbox" id="lang-vi" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/vi.png"> Vietnamese </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-cy">
|
|||
|
|
<input type="checkbox" id="lang-cy" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/cy.png"> Welsh </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="col-md-3">
|
|||
|
|
<div class="language-box">
|
|||
|
|
<label for="lang-yi">
|
|||
|
|
<input type="checkbox" id="lang-yi" class="sp-lang-option">
|
|||
|
|
<img height="12" width="18" src="https://secureprivacy.ai/wp-content/plugins/sitepress-multilingual-cms/res/flags/yi.png"> Yiddish </label>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</form>
|
|||
|
|
<div class="col-md-12">
|
|||
|
|
<button class="btn_save_settings_page pull-right btn btn-success"> Save changes</button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</form>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
<div class="col-sm-3 information">
|
|||
|
|
<div class="content-box">
|
|||
|
|
<h3 class="content-box-header" style="background: #dddddd;">
|
|||
|
|
Information
|
|||
|
|
</h3>
|
|||
|
|
<div class="content-box-wrapper support-articles">
|
|||
|
|
<h2> Support</h2>
|
|||
|
|
<a href="https://secureprivacysupport.zendesk.com/" target="_blank" class="btn btn-info">Get support</a>
|
|||
|
|
|
|||
|
|
<hr/>
|
|||
|
|
<h2> Support articles</h2>
|
|||
|
|
<div>
|
|||
|
|
<a href="https://secureprivacysupport.zendesk.com/hc/en-us/articles/360013138852-How-to-add-privacy-policy-text-on-WordPress"
|
|||
|
|
target="_blank" class="">How to add privacy policy text on WordPress</a>
|
|||
|
|
</div>
|
|||
|
|
<div>
|
|||
|
|
<a href="https://secureprivacysupport.zendesk.com/hc/en-us/articles/360013137132-How-to-add-privacy-button-on-Wordpress-menu"
|
|||
|
|
target="_blank" class="">How to add privacy button on Wordpress menu</a>
|
|||
|
|
</div>
|
|||
|
|
<div>
|
|||
|
|
<a href="https://secureprivacysupport.zendesk.com/hc/en-us/articles/360012912712-What-is-prior-consent-and-how-to-implement-it-"
|
|||
|
|
target="_blank" class="">What is ‘prior consent’ and how to implement it?</a>
|
|||
|
|
</div>
|
|||
|
|
<div>
|
|||
|
|
<a href="https://secureprivacysupport.zendesk.com/hc/en-us/articles/360013137552-How-to-add-Prior-Consent-with-Google-Tag-Manager-GTM-"
|
|||
|
|
target="_blank" class="">How to add Prior Consent with Google Tag Manager (GTM)?</a>
|
|||
|
|
</div>
|
|||
|
|
<div>
|
|||
|
|
<a href="https://secureprivacysupport.zendesk.com/hc/en-us/articles/360015115112-Developer-guide-for-JavaScript-methods"
|
|||
|
|
target="_blank" class="">Developer guide for JavaScript methods</a>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<form id="saveValueForm" action="options.php" method="post">
|
|||
|
|
<?php
|
|||
|
|
settings_fields( $this->plugin_name );
|
|||
|
|
do_settings_sections( $this->plugin_name );
|
|||
|
|
?>
|
|||
|
|
</form>
|
|||
|
|
<script>
|
|||
|
|
//case of a fresh install
|
|||
|
|
if (document.getElementById('outdated_notice_adminId').value === '' && document.getElementById('outdated_notice_sessionId').value === '') {
|
|||
|
|
window.location.href = '<?php echo admin_url('admin.php?page=welcome'); ?>';
|
|||
|
|
} else if (document.getElementById('outdated_notice_sessionId').value === '') {
|
|||
|
|
window.location.href = '<?php echo admin_url('admin.php?page=login'); ?>';
|
|||
|
|
} else {
|
|||
|
|
document.getElementById('page_settings_page').style.display ='block';
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
(function ($) {
|
|||
|
|
'use strict';
|
|||
|
|
getSupportedFeatures(window.document.getElementById('outdated_notice_planName').value);
|
|||
|
|
if (window.sp_supportedFeatures.multiLanguage === false) {
|
|||
|
|
$(".sp-lang-option").each(function() {
|
|||
|
|
this.type= "radio";
|
|||
|
|
this.name= "radio-language-option";
|
|||
|
|
});
|
|||
|
|
$('#btn_multiple_language').show();
|
|||
|
|
}
|
|||
|
|
if (window.sp_supportedFeatures.targetEU === false) {
|
|||
|
|
$("#country-switch").prop("disabled", true);
|
|||
|
|
$('#btn_upgrade_target').show();
|
|||
|
|
}
|
|||
|
|
$("#btn_upgrade_target").on("click", function () {
|
|||
|
|
window.sp_upgradePlan();
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
$("#btn_multiple_language button").on("click", function () {
|
|||
|
|
window.sp_upgradePlan();
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
var adminConsentSettings, bannerDisplayOptions, editModalBanner,allBannerTranslation,extraSettings, selectedBannerLanguage;
|
|||
|
|
$.getScript("//cdnjs.cloudflare.com/ajax/libs/bootstrap-colorpicker/2.5.2/js/bootstrap-colorpicker.min.js", function (data, textStatus, jqxhr) {
|
|||
|
|
initialize();
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
$("<link/>", {
|
|||
|
|
rel: "stylesheet",
|
|||
|
|
type: "text/css",
|
|||
|
|
href: "//cdnjs.cloudflare.com/ajax/libs/bootstrap-colorpicker/2.5.3/css/bootstrap-colorpicker.min.css"
|
|||
|
|
}).appendTo("head");
|
|||
|
|
|
|||
|
|
//get display settings
|
|||
|
|
|
|||
|
|
function initialize() {
|
|||
|
|
$('#loading_span').show();
|
|||
|
|
$.ajax({
|
|||
|
|
url: "<?php echo plugin_dir_url( __FILE__ ) . '../js/bannerTranslation.json'; ?>" ,
|
|||
|
|
type: "GET",
|
|||
|
|
contentType: 'application/json; charset=utf-8',
|
|||
|
|
dataType: "json",
|
|||
|
|
success: function (data) {
|
|||
|
|
allBannerTranslation = data;
|
|||
|
|
},
|
|||
|
|
error: function (e,x,v) { }
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
|
|||
|
|
$.ajax({
|
|||
|
|
url: window.sp_baseContext + '/api/adminsettings/display?Domain=' + $('#outdated_notice_domainId').val(),
|
|||
|
|
type: "GET",
|
|||
|
|
headers: {
|
|||
|
|
"Authorization": window.getAuthToken()
|
|||
|
|
},
|
|||
|
|
contentType: 'application/json; charset=utf-8',
|
|||
|
|
dataType: "json",
|
|||
|
|
success: function (data) {
|
|||
|
|
$('#loading_span').hide();
|
|||
|
|
adminConsentSettings = data;
|
|||
|
|
bannerDisplayOptions = JSON.parse(adminConsentSettings.DisplayOptions);
|
|||
|
|
extraSettings = JSON.parse(adminConsentSettings.ExtraSettings);
|
|||
|
|
$('#tbxBackgroundColor').val(adminConsentSettings.BackgroundColor);
|
|||
|
|
$('#tbxTextColor').val(adminConsentSettings.FontColor);
|
|||
|
|
$('#tbxCancelColor').val(adminConsentSettings.CancelButtonColor);
|
|||
|
|
$('#tbxSaveColor').val(adminConsentSettings.SaveButtonColor);
|
|||
|
|
$('#cp1').colorpicker({
|
|||
|
|
'container': true
|
|||
|
|
});
|
|||
|
|
$('#cp2').colorpicker({
|
|||
|
|
'container': true
|
|||
|
|
});
|
|||
|
|
$('#cp3').colorpicker({
|
|||
|
|
'container': true
|
|||
|
|
});
|
|||
|
|
$('#cp4').colorpicker({
|
|||
|
|
'container': true
|
|||
|
|
});
|
|||
|
|
$("input[name=optradio][value=" + adminConsentSettings.BackgroundColor + "]").prop('checked', true);
|
|||
|
|
|
|||
|
|
$("input[name=optLogoRadio][value=" + bannerDisplayOptions.logoColor + "]").prop('checked', true); $("input[name=optBackgroundRadio][value=" + bannerDisplayOptions.showOverlay + "]").prop('checked', true);
|
|||
|
|
$("#country-switch").val(bannerDisplayOptions.showBannerCountries);
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
error: function (e,x,v) {
|
|||
|
|
if (e.status === 401) {
|
|||
|
|
window.location.href = '<?php echo admin_url('admin.php?page=login'); ?>' + '&redirectTo=' + window.location.href + '&sessionExpired=true';
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
$.ajax({
|
|||
|
|
url: window.sp_baseContext + '/api/banner?Domain=' + $('#outdated_notice_domainId').val(),
|
|||
|
|
type: "GET",
|
|||
|
|
headers: {
|
|||
|
|
"Authorization": window.getAuthToken()
|
|||
|
|
},
|
|||
|
|
contentType: 'application/json; charset=utf-8',
|
|||
|
|
dataType: "json",
|
|||
|
|
success: function (allBanners) {
|
|||
|
|
if (allBanners.length > 0) {
|
|||
|
|
editModalBanner = allBanners[0];
|
|||
|
|
}
|
|||
|
|
for (var i = 0; i < editModalBanner.ComplianceLocalizedLists.length; i++) {
|
|||
|
|
$('#lang-' + editModalBanner.ComplianceLocalizedLists[i].Localization).prop('checked', true);
|
|||
|
|
$('#lang-' + editModalBanner.ComplianceLocalizedLists[i].Localization).parent().parent().addClass('active-language-highlight');
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
error: function (e,x,v) {
|
|||
|
|
if (e.status === 401) {
|
|||
|
|
window.location.href = '<?php echo admin_url('admin.php?page=login'); ?>' + '&redirectTo=' + window.location.href + '&sessionExpired=true';
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
$(".btn_save_settings_page").on("click", function () {
|
|||
|
|
$(".btn_save_settings_page").prop("disabled", true);
|
|||
|
|
$(".btn_save_settings_page").text("Saving");
|
|||
|
|
|
|||
|
|
createLanguageBanners();
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
function saveDisplay() {
|
|||
|
|
adminConsentSettings.BackgroundColor = $('#tbxBackgroundColor').val();
|
|||
|
|
adminConsentSettings.FontColor = $('#tbxTextColor').val();
|
|||
|
|
adminConsentSettings.CancelButtonColor = $('#tbxCancelColor').val();
|
|||
|
|
adminConsentSettings.SaveButtonColor = $('#tbxSaveColor').val();
|
|||
|
|
bannerDisplayOptions.showOverlay = $("input[name='optBackgroundRadio']:checked").val();
|
|||
|
|
bannerDisplayOptions.logoColor = $("input[name='optLogoRadio']:checked").val();
|
|||
|
|
bannerDisplayOptions.showBannerCountries = $("#country-switch").val();
|
|||
|
|
adminConsentSettings.DisplayOptions = JSON.stringify(bannerDisplayOptions);
|
|||
|
|
adminConsentSettings.Domain = $('#outdated_notice_domainId').val();
|
|||
|
|
adminConsentSettings.ExtraSettings = JSON.stringify(extraSettings);
|
|||
|
|
|
|||
|
|
$.ajax({
|
|||
|
|
url: window.sp_baseContext + '/api/adminsettings/display',
|
|||
|
|
type: "PUT",
|
|||
|
|
headers: {
|
|||
|
|
"Authorization": window.getAuthToken()
|
|||
|
|
},
|
|||
|
|
data: JSON.stringify(adminConsentSettings),
|
|||
|
|
contentType: 'application/json; charset=utf-8',
|
|||
|
|
dataType: "json",
|
|||
|
|
success: function (data) {
|
|||
|
|
alert('Saved successfully');
|
|||
|
|
$(".btn_save_settings_page").prop("disabled", false);
|
|||
|
|
$(".btn_save_settings_page").text("Save changes");
|
|||
|
|
},
|
|||
|
|
error: function (e,x,v) {
|
|||
|
|
if (e.status === 401) {
|
|||
|
|
window.location.href = '<?php echo admin_url('admin.php?page=login'); ?>' + '&redirectTo=' + window.location.href + '&sessionExpired=true';
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
function updateBanner() {
|
|||
|
|
editModalBanner.Domain = $('#outdated_notice_domainId').val();
|
|||
|
|
$.ajax({
|
|||
|
|
url: window.sp_baseContext + '/api/banner' ,
|
|||
|
|
type: "PUT",
|
|||
|
|
headers: {
|
|||
|
|
"Authorization": window.getAuthToken()
|
|||
|
|
},
|
|||
|
|
data: JSON.stringify(editModalBanner),
|
|||
|
|
contentType: 'application/json; charset=utf-8',
|
|||
|
|
dataType: "json",
|
|||
|
|
success: function (data) {
|
|||
|
|
console.log('Banner language updated');
|
|||
|
|
saveDisplay();
|
|||
|
|
},
|
|||
|
|
error: function (e,x,v) {
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function createLanguageBanners() {
|
|||
|
|
|
|||
|
|
var bannerLanguage = [];
|
|||
|
|
$(".sp-lang-option").each(function() {
|
|||
|
|
if (this.checked) {
|
|||
|
|
bannerLanguage.push({
|
|||
|
|
'value': this.id.split('-')[1],
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
console.log(bannerLanguage);
|
|||
|
|
var newComplianceLocalizedLists = [];
|
|||
|
|
if (editModalBanner.ComplianceLocalizedLists && editModalBanner.ComplianceLocalizedLists.length > 0) {
|
|||
|
|
selectedBannerLanguage = editModalBanner.ComplianceLocalizedLists[0].Localization;
|
|||
|
|
} else {
|
|||
|
|
selectedBannerLanguage = 'en';
|
|||
|
|
}
|
|||
|
|
bannerLanguage.forEach(sup => {
|
|||
|
|
if (checkLanguageExists(sup.value) === true) {
|
|||
|
|
editModalBanner.ComplianceLocalizedLists.forEach(list => {
|
|||
|
|
if (list.Localization === sup.value) {
|
|||
|
|
newComplianceLocalizedLists.push(list);
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
// Duplicating Existing Data
|
|||
|
|
if (checkLanguageExists(sup.value) === false) {
|
|||
|
|
editModalBanner.ComplianceLocalizedLists.forEach(list => {
|
|||
|
|
if (list.Localization === selectedBannerLanguage) {
|
|||
|
|
var listData = JSON.parse(JSON.stringify(list));
|
|||
|
|
listData.Localization = sup.value;
|
|||
|
|
var cHead = reversetoKeyword(list.CategoyHeading, list.Localization);
|
|||
|
|
listData.CategoyText = getSelectedCategoryText(cHead, listData.Localization);
|
|||
|
|
listData.CategoyHeading = getBannerTranslation(cHead, listData.Localization);
|
|||
|
|
newComplianceLocalizedLists.push(listData);
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
editModalBanner.ComplianceLocalizedLists = newComplianceLocalizedLists;
|
|||
|
|
var newExtraSettings = [];
|
|||
|
|
bannerLanguage.forEach(sup => {
|
|||
|
|
if (checkSettingsExists(sup.value) === true) {
|
|||
|
|
extraSettings.forEach(list => {
|
|||
|
|
if (list.localization === sup.value) {
|
|||
|
|
newExtraSettings.push(list);
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if (checkSettingsExists(sup.value) === false) {
|
|||
|
|
|
|||
|
|
extraSettings.forEach(list => {
|
|||
|
|
if (list.localization === selectedBannerLanguage) {
|
|||
|
|
var listData = JSON.parse(JSON.stringify(list));
|
|||
|
|
listData.localization = sup.value;
|
|||
|
|
listData.saveButtonText = getBannerTranslation('Save', sup.value);
|
|||
|
|
listData.cancelButtonText = getBannerTranslation('Remind later', sup.value);
|
|||
|
|
listData.bannerIntroduction = getBannerTranslation('bannerIntroduction', sup.value);
|
|||
|
|
listData.privacyReminderText = getBannerTranslation('Privacy reminder from', sup.value) + ' ' + window.sp_domainPath;
|
|||
|
|
listData.textforPrivacyPolicy = getBannerTranslation('textforPrivacyPolicy', sup.value);
|
|||
|
|
listData.settingsButtonText = getBannerTranslation('Settings', sup.value);
|
|||
|
|
listData.acceptButtonText = getBannerTranslation('Accept', sup.value);
|
|||
|
|
listData.rejectButtonText = getBannerTranslation('Remind later', sup.value);
|
|||
|
|
listData.dpoOfficerText = getBannerTranslation('dpo at', sup.value) + ' ' + window.sp_domainPath;
|
|||
|
|
listData.widgetText = getBannerTranslation('Privacy', sup.value);
|
|||
|
|
listData.blockText = getBannerTranslation('Block/Enable', sup.value);
|
|||
|
|
listData.noOptOut = getBannerTranslation('No Opt Out', sup.value);
|
|||
|
|
listData.goToSite = getBannerTranslation('Go to site', sup.value);
|
|||
|
|
newExtraSettings.push(listData);
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
extraSettings = newExtraSettings;
|
|||
|
|
updateBanner();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function getSelectedCategoryText(category, lang) {
|
|||
|
|
var categoryText = getBannerTranslation('categoryText', lang);
|
|||
|
|
switch (category) {
|
|||
|
|
case 'advertising':
|
|||
|
|
categoryText = getBannerTranslation('Advertising Category Text', lang);
|
|||
|
|
break;
|
|||
|
|
case 'social_media':
|
|||
|
|
categoryText = getBannerTranslation('Social Media Category Text', lang);
|
|||
|
|
break;
|
|||
|
|
case 'site_analytics':
|
|||
|
|
categoryText = getBannerTranslation('Analytics Category Text', lang);
|
|||
|
|
break;
|
|||
|
|
case 'customer_interaction':
|
|||
|
|
categoryText = getBannerTranslation('Customer Interaction Category Text', lang);
|
|||
|
|
break;
|
|||
|
|
case 'comments':
|
|||
|
|
categoryText = getBannerTranslation('Comments Category Text', lang);
|
|||
|
|
break;
|
|||
|
|
case 'audio_video_player':
|
|||
|
|
categoryText = getBannerTranslation('Media Player Category Text', lang);
|
|||
|
|
break;
|
|||
|
|
case 'essential':
|
|||
|
|
categoryText = getBannerTranslation('Essential Category Text', lang);
|
|||
|
|
break;
|
|||
|
|
case 'Cookies':
|
|||
|
|
categoryText = getBannerTranslation('cookieBanner', lang);
|
|||
|
|
break;
|
|||
|
|
default:
|
|||
|
|
categoryText = getBannerTranslation('categoryText', lang);
|
|||
|
|
}
|
|||
|
|
return categoryText;
|
|||
|
|
}
|
|||
|
|
function checkLanguageExists(lang) {
|
|||
|
|
var result = false;
|
|||
|
|
var self = this;
|
|||
|
|
editModalBanner.ComplianceLocalizedLists.forEach(em => {
|
|||
|
|
if (em.Localization === lang) {
|
|||
|
|
result = true;
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
return result;
|
|||
|
|
}
|
|||
|
|
function getBannerTranslation(keyword, lang) {
|
|||
|
|
var filterResult;
|
|||
|
|
filterResult = allBannerTranslation.filter(function (l) {
|
|||
|
|
return l.Language === lang && l.Keyword === keyword;
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
if (filterResult && filterResult.length > 0) {
|
|||
|
|
return filterResult[0].TranslatedText;
|
|||
|
|
} else {
|
|||
|
|
return keyword;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
function checkSettingsExists(lang) {
|
|||
|
|
var result = false;
|
|||
|
|
extraSettings.forEach(em => {
|
|||
|
|
if (em.localization === lang) {
|
|||
|
|
result = true;
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
return result;
|
|||
|
|
}
|
|||
|
|
function reversetoKeyword(translatedText, lang) {
|
|||
|
|
var filterResult;
|
|||
|
|
filterResult = allBannerTranslation.filter(function (l) {
|
|||
|
|
return l.Language === lang && l.TranslatedText === translatedText;
|
|||
|
|
});
|
|||
|
|
if (filterResult && filterResult.length > 0) {
|
|||
|
|
return filterResult[0].Keyword;
|
|||
|
|
} else {
|
|||
|
|
return translatedText;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
window.resetPlan(false);
|
|||
|
|
|
|||
|
|
})(jQuery);
|
|||
|
|
</script>
|