mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
Merge remote-tracking branch 'origin/support/2.7' into support/3.0
# Conflicts: # composer.lock # js/wizardhelper.js # lib/composer/autoload_real.php # lib/composer/installed.json # lib/composer/installed.php # lib/guzzlehttp/guzzle/CHANGELOG.md # setup/wizardsteps.class.inc.php
This commit is contained in:
@@ -695,6 +695,13 @@ class WizStepLicense extends WizardStep
|
||||
return array('class' => 'WizStepDBParams', 'state' => '');
|
||||
}
|
||||
|
||||
private function NeedsRgpdConsent()
|
||||
{
|
||||
$sMode = $this->oWizard->GetParameter('install_mode');
|
||||
$aModules = SetupUtils::AnalyzeInstallation($this->oWizard);
|
||||
return $sMode == 'install' && !SetupUtils::IsProductVersion($aModules);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param WebPage $oPage
|
||||
*/
|
||||
@@ -728,8 +735,31 @@ CSS
|
||||
$oPage->add('</ul>');
|
||||
$oPage->add('</fieldset>');
|
||||
$sChecked = ($this->oWizard->GetParameter('accept_license', 'no') == 'yes') ? ' checked ' : '';
|
||||
$oPage->add('<div class="setup-accept-licenses"><input type="checkbox" name="accept_license" id="accept" value="yes" '.$sChecked.'><label for="accept">I accept the terms of the licenses of the '.count($aLicenses).' components mentioned above.</label></div>');
|
||||
$oPage->add_ready_script('$("#accept").bind("click change", function() { WizardUpdateButtons(); });');
|
||||
$oPage->add('<div class="setup-accept-licenses"><input class="check_select" type="checkbox" name="accept_license" id="accept" value="yes" '.$sChecked.'><label for="accept">I accept the terms of the licenses of the '.count($aLicenses).' components mentioned above.</label></div>');
|
||||
if ($this->NeedsRgpdConsent()) {
|
||||
$oPage->add('<div id="rgpd_message" class="message message-info">iTop software is compliant with the processing of personal data according to the European General Data Protection Regulation (GDPR).<p></p>
|
||||
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.</p>
|
||||
<p>List of collected data available in our <a target="_blank" href="https://www.itophub.io/page/data-privacy">Data privacy section.</p></a>');
|
||||
$oPage->add('<input type="checkbox" class="check_select" id="rgpd_consent">');
|
||||
$oPage->add('<label for="rgpd_consent"> I accept the processing of my personal data</label>');
|
||||
$oPage->add('</div>');
|
||||
}
|
||||
$oPage->add_ready_script('$(".check_select").bind("click change", function() { WizardUpdateButtons(); });');
|
||||
|
||||
$oPage->add_script(
|
||||
<<<JS
|
||||
function isRgpdConsentOk(){
|
||||
let eRgpdConsent = $("#rgpd_consent");
|
||||
if(eRgpdConsent.length){
|
||||
if(!eRgpdConsent[0].checked){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
JS
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -738,7 +768,7 @@ CSS
|
||||
*/
|
||||
public function JSCanMoveForward()
|
||||
{
|
||||
return 'return ($("#accept").prop("checked"));';
|
||||
return 'return ($("#accept").prop("checked") && isRgpdConsentOk());';
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user