mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
Merge remote-tracking branch 'origin/support/3.0' into develop
This commit is contained in:
@@ -1654,6 +1654,18 @@ JS
|
||||
return array_key_exists('itsm-designer-connector', $aModules);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $aModules List of available module codes
|
||||
*
|
||||
* @return bool true if the Hub connector is installed
|
||||
*
|
||||
* @since 2.7.8 3.0.3 3.1.0 N°5758 method creation
|
||||
*/
|
||||
public static function IsConnectableToITopHub($aModules)
|
||||
{
|
||||
return array_key_exists('itop-hub-connector', $aModules);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $aModules Available modules with code as key and metadata array as values
|
||||
* Same structure as the one returned by {@link \RunTimeEnvironment::AnalyzeInstallation}
|
||||
|
||||
@@ -680,15 +680,17 @@ class WizStepLicense extends WizardStep
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @return bool true if we need to display a GDPR confirmation
|
||||
* @throws \Exception
|
||||
* @since 2.7.7 3.0.2 3.1.0
|
||||
* @since 2.7.7 3.0.2 3.1.0 N°5037 method creation
|
||||
* @since 2.7.8 3.0.3 3.1.0 N°5758 rename from NeedsRgpdConsent to NeedsGdprConsent
|
||||
*/
|
||||
private function NeedsRgpdConsent()
|
||||
private function NeedsGdprConsent()
|
||||
{
|
||||
$sMode = $this->oWizard->GetParameter('install_mode');
|
||||
$aModules = SetupUtils::AnalyzeInstallation($this->oWizard);
|
||||
return $sMode == 'install' && !SetupUtils::IsProductVersion($aModules);
|
||||
|
||||
return (($sMode === 'install') && SetupUtils::IsConnectableToITopHub($aModules));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -724,7 +726,7 @@ CSS
|
||||
$oPage->add('</fieldset>');
|
||||
$sChecked = ($this->oWizard->GetParameter('accept_license', 'no') == 'yes') ? ' checked ' : '';
|
||||
$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()) {
|
||||
if ($this->NeedsGdprConsent()) {
|
||||
$oPage->add('<br>');
|
||||
$oPage->add('<fieldset>');
|
||||
$oPage->add('<legend>European General Data Protection Regulation</legend>');
|
||||
|
||||
Reference in New Issue
Block a user