diff --git a/modules/consentAdmin/config-templates/module_consentAdmin.php b/modules/consentAdmin/config-templates/module_consentAdmin.php index dd338f702e03a84e150742d9fcc94a296ddc75e3..c40fd13991a6adf9c63409932492aa683eb0f2a6 100644 --- a/modules/consentAdmin/config-templates/module_consentAdmin.php +++ b/modules/consentAdmin/config-templates/module_consentAdmin.php @@ -22,4 +22,7 @@ $config = array( // Where to direct the user after logout 'relaystate' => 'www.wayf.dk', + + // Shows description of the services if set to true (defaults to true) + 'showDesription' => true, ); diff --git a/modules/consentAdmin/dictionaries/consentadmin.php b/modules/consentAdmin/dictionaries/consentadmin.php index 4a002f1f2b6ad8e529672ccf6a8bdc551496bd81..030dedd0043e53a6762d087313fc18b45868c709 100644 --- a/modules/consentAdmin/dictionaries/consentadmin.php +++ b/modules/consentAdmin/dictionaries/consentadmin.php @@ -194,7 +194,10 @@ WAYF foretager behandlinger af personoplysninger i henhold til persondataloven ( 'en' => 'show/hide attributes', 'da' => 'vis/skjul attributter', ), - + 'consentadmin_purpose' => array( + 'en' => 'The purpose of the service is', + 'da' => 'FormĂĄlet med tjenesten er', + ), ); diff --git a/modules/consentAdmin/templates/consentadmin.php b/modules/consentAdmin/templates/consentadmin.php index de96ab211d874edcba18059291a3b5a02f4b8109..c1023b39b1cb5f6ef7f73e3a012ea1f23a32f8bd 100755 --- a/modules/consentAdmin/templates/consentadmin.php +++ b/modules/consentAdmin/templates/consentadmin.php @@ -75,8 +75,8 @@ span.showhide { foreach ($spList AS $spName => $spValues) { $this->includeInlineTranslation('spname', $spValues['name']); $this->includeInlineTranslation('spdescription', $spValues['description']); - $htmlSpName = htmlspecialchars($this->t('spname', array(), false, true) ); - $spDescription = htmlspecialchars($this->t('spdescription',array(), false, true)); + $htmlSpName = $this->t('spname', array(), false, true); + $spDescription = $this->t('spdescription',array(), false, true); $checkedAttr = $spValues['consentStatus'] == 'ok' ? "checked='yes'" : ""; $consentValue = $spValues['consentValue']; $consentText = $spValues['consentStatus'] == 'changed' ? "attributes has changed" : ""; @@ -90,7 +90,10 @@ span.showhide { <tr><td colspan="2" class="caAttributes"><div id="attributes_$show_spid" style="display: none;"> TRSTART; $attributes = $spValues['attributes_by_sp']; - echo "\n<ul>\n"; + if ($this->data['showDescription']) { + echo '<p>' . $this->t('consentadmin_purpose') . ' ' . $spDescription . '</p>'; + } + echo "\n<ul>\n"; foreach ($attributes AS $name => $value) { if (isset($this->data['attribute_' . htmlspecialchars(strtolower($name)) ])) { diff --git a/modules/consentAdmin/www/consentAdmin.php b/modules/consentAdmin/www/consentAdmin.php index b6573c213bb8b4673abb7560ca775341b6c34bde..830d07163cd0fac8ce6b945f0e094e01f93446c8 100644 --- a/modules/consentAdmin/www/consentAdmin.php +++ b/modules/consentAdmin/www/consentAdmin.php @@ -241,5 +241,6 @@ $relaystate = $cA_config->getValue('relaystate'); $et->data['header'] = 'Consent Administration'; $et->data['logout'] = '<p>[ <a href="/' . $config->getBaseURL() . 'saml2/sp/initSLO.php?RelayState='. $relaystate .'">Logout</a> ]'; $et->data['spList'] = $sp_list; +$et->data['showDescription'] = $cA_config->getValue('showDescription'); $et->show(); ?>