diff --git a/datamodels/2.x/itop-hub-connector/datamodel.itop-hub-connector.xml b/datamodels/2.x/itop-hub-connector/datamodel.itop-hub-connector.xml
index 4f5406bde..0e1097ca0 100644
--- a/datamodels/2.x/itop-hub-connector/datamodel.itop-hub-connector.xml
+++ b/datamodels/2.x/itop-hub-connector/datamodel.itop-hub-connector.xml
@@ -15,12 +15,13 @@
https://www.itophub.io
- /my-instances/landing-from-remote
- /stateless-remote-itop/landing-from-remote-stateless
- /api/messages
- /api/messages/mark-all-as-read
- /messages
+ /my-instances/landing-from-remote
+ /stateless-remote-itop/landing-from-remote-stateless
+ /api/messages
+ /api/messages/mark-all-as-read
+ /messages
../pages/exec.php?exec_module=itop-hub-connector&exec_page=launch.php&target=inform_after_setup
+ https://www.itophub.io/page/data-privacy
diff --git a/setup/wizardsteps.class.inc.php b/setup/wizardsteps.class.inc.php
index 362af67a0..061701227 100644
--- a/setup/wizardsteps.class.inc.php
+++ b/setup/wizardsteps.class.inc.php
@@ -2143,6 +2143,13 @@ class WizStepSummary extends WizardStep
return array('class' => 'WizStepDone', 'state' => '');
}
+ private function NeedsRgpdConsent()
+ {
+ $sMode = $this->oWizard->GetParameter('install_mode');
+ $aSelectedModules = json_decode($this->oWizard->GetParameter('selected_modules'), true);
+ return $sMode == 'install' && !SetupUtils::IsProductVersion($aSelectedModules);
+ }
+
public function Display(WebPage $oPage)
{
$oPage->add_style(
@@ -2296,6 +2303,34 @@ CSS
$oPage->add(''); // progress_content
$oPage->add('');
+ if ($this->NeedsRgpdConsent()) {
+ $oConfig = new Config(utils::GetConfigFilePath());
+ $oProductionEnv = new RunTimeEnvironment('production');
+ $oProductionEnv->InitDataModel($oConfig, true);
+ $sRgpdUrl = $oConfig->GetModuleSetting('itop-hub-connector', 'rgpd_url', '');
+ $oPage->add('
iTop software is compliant with the processing of personal data according to the European General Data Protection Regulation (GDPR).
+By installing iTop you agree that some information will be collected by Combodo to help you manage your instances and for statistical purposes.
+This data remains anonymous until it is associated to a user account on iTop Hub.
+List of collected data available in our Data privacy section.
More informations here
');
+ $oPage->add('
');
+ $oPage->add('
I accept the processing of my personal data ');
+ $oPage->add('
');
+ $oPage->add_ready_script('$("#rgpd_consent").bind("click change", function() { WizardUpdateButtons(); });');
+ }
+ $oPage->add_script(
+ <<add(' ');
@@ -2436,6 +2471,7 @@ JS
WizardUpdateButtons();
$('#setup_msg').html('$sMessage');
$('#progress').progression( {Current:{$aRes['percentage-completed']}, Maximum: 100} );
+ $("#rgpd_message").hide();
//$("#percentage").html('{$aRes['percentage-completed']} % completed {$aRes['next-step-label']}');
ExecuteStep('{$aRes['next-step']}');
@@ -2475,7 +2511,7 @@ EOF
*/
public function JSCanMoveForward()
{
- return 'return (($("#wiz_form").data("installation_status") === "not started") || ($("#wiz_form").data("installation_status") === "completed"));';
+ return 'return (($("#wiz_form").data("installation_status") === "not started" && isRgpdConsentOk()) || ($("#wiz_form").data("installation_status") === "completed"));';
}
/**