diff --git a/dictionaries/consent.php b/dictionaries/consent.php new file mode 100644 index 0000000000000000000000000000000000000000..a30e1ff64b5e6e5b62d4641da69dc6378b504675 --- /dev/null +++ b/dictionaries/consent.php @@ -0,0 +1,182 @@ +<?php + +// consentadmin dictionary + +/* + '' => array( + 'en' => '', + 'no' => '', + 'nn' => '', + 'da' => '', + 'es' => '', + 'fr' => '', + 'de' => '', + 'nl' => '', + 'lu' => '', + 'sl' => '', + ), + + +* +* */ + + +$lang = array( + +// WAYF: Additional attributes START + + 'attribute_org' => array( + 'en' => 'Organisation', + 'da' => 'Organisation', + ), + + 'attribute_id' => array( + 'en' => 'Id', + 'da' => 'Id', + ), + + 'attribute_injected' => array( + 'en' => 'Injected attribute', + 'da' => 'Injiceret attribut', + ), + +// WAYF: Additional attributes END + + +'yes' => array( + 'en' => 'yes', + 'no' => 'ja', + 'nn' => 'ja', + 'da' => 'ja', +// 'es' => '', + 'fr' => 'oui', + 'de' => 'ja', +// 'nl' => '', +// 'lu' => '', +// 'sl' => '', + ), + +'no' => array( + 'en' => 'no', + 'no' => 'nej', + 'nn' => 'nej', + 'da' => 'nej', +// 'es' => 'no', + 'fr' => 'non', + 'de' => 'nein', +// 'nl' => '', +// 'lu' => '', +// 'sl' => '', + ), + + + 'remember' => array( + 'en' => 'remember consent', + 'no' => 'husk samtykke', + //'nn' => '', + 'da' => 'husk samtykke', +// 'es' => '', +// 'fr' => '', +// 'de' => '', +// 'nl' => '', +// 'lu' => '', +// 'sl' => '', + ), + + + 'consent_notice' => array( + 'en' => 'You are about to login to the service', + 'no' => 'Du er ved at logge pĂĄ servicen', +// 'nn' => '', + 'da' => 'Du er ved at logge ind pĂĄ servicen', +// 'es' => '', +// 'fr' => '', +// 'de' => '', +// 'nl' => '', +// 'lu' => '', +// 'sl' => '', + ), + + 'consent_accept' => array( + 'en' => 'In the login proccess, the identity provider will send attributes containing information about your identity to this service. Do you accept this?', +// 'no' => '', +// 'nn' => '', + 'da' => 'I login processen vil din Identity Provider sende attributter som indeholder oplysninger om din identitet til denne service. Vil du acceptere dette?', +// 'es' => '', +// 'fr' => '', +// 'de' => '', +// 'nl' => '', +// 'lu' => '', +// 'sl' => '', + ), + + + 'login' => array( + 'en' => 'login', +// 'no' => '', +// 'nn' => '', + 'da' => 'login', +// 'es' => '', +// 'fr' => '', +// 'de' => '', +// 'nl' => '', +// 'lu' => '', +// 'sl' => '', + ), + + 'service_providers_for' => array( + 'en' => 'Service Providers for', + 'no' => 'Service Providers for', + 'nn' => 'Service Providers for', + 'da' => 'Service Providers for', +// 'es' => '', +// 'fr' => '', +// 'de' => '', +// 'nl' => '', +// 'lu' => '', +// 'sl' => '', + ), + + + + 'service_provider_header' => array( + 'en' => 'Service Provider', + 'no' => 'Service Provider', + 'nn' => 'Service Provider', + 'da' => 'Service Provider', + 'es' => 'Service Provider', + 'fr' => 'Service Provider', + 'de' => 'Service Provider', + 'nl' => 'Service Provider', + 'lu' => 'Service Provider', + 'sl' => 'Service Provider', + ), + + 'status_header' => array( + 'en' => 'Consent status', + 'no' => 'Samtykke status', + //'nn' => '', + 'da' => 'Samtykke status', +// 'es' => '', +// 'fr' => '', +// 'de' => '', +// 'nl' => '', +// 'lu' => '', +// 'sl' => '', + ), + + 'show_hide_attributes' => array( + 'en' => 'show/hide attributes', + 'no' => 'vis/skjul attributter', + //'nn' => 'vis/skjul attributter', + 'da' => 'vis/skjul attributter', +// 'es' => '', +// 'fr' => '', +// 'de' => '', +// 'nl' => '', +// 'lu' => '', +// 'sl' => '', + ), + +); + diff --git a/templates/default/consent.php b/templates/default/consent.php index 7e548321be2f8b47a0c0dd3766c9ac0f566f39f2..db4284a79d85f5065afc8d4cfef4ac45f0db86a6 100644 --- a/templates/default/consent.php +++ b/templates/default/consent.php @@ -1,23 +1,27 @@ <?php $this->includeAtTemplateBase('includes/header.php'); ?> - +<?php +//array('SP'=> + $this->includeLanguageFile('consent.php'); + $this->includeInlineTranslation('spname', $this->data['sp_name']); + //$this->includeInlineTranslation('spdescription', $this->data['description']); +?> <div id="content"> - - <p>You are about to login to the service <strong><?php echo htmlspecialchars($this->data['sp_name']); ?></strong>. In the login proccess, the identity provider will send attributes containing information about your identity to this service. Do you accept this?</p> - - - +[default] + <p><?php echo htmlspecialchars($this->t('consent_notice')); ?> <strong><?php echo htmlspecialchars($this->t('spname', false, true) ); ?></strong>. + <?php echo htmlspecialchars($this->t('consent_accept')) ?> + </p> <form action="<?php echo htmlspecialchars($this->data['consenturl']); ?>"> - <input type="submit" value="Yes" /> + <input type="submit" value="<?php echo htmlspecialchars($this->t('yes')) ?>" /> <input type="hidden" name="consent" value="<?php echo htmlspecialchars($this->data['consent_cookie']); ?>" /> <input type="hidden" name="RequestID" value="<?php echo htmlspecialchars($this->data['requestid']); ?>" /> <?php if($this->data['usestorage']) { ?> - <input type="checkbox" name="saveconsent" id="saveconsent" value="1" /> remember consent + <input type="checkbox" name="saveconsent" id="saveconsent" value="1" /> <?php echo htmlspecialchars($this->t('remember')) ?> <?php } ?> </form> <form action="<?php echo htmlspecialchars($this->data['noconsent']); ?>" method="GET"> - <input type="submit" value="No" /> + <input type="submit" value="<?php echo htmlspecialchars($this->t('no')) ?>" /> </form> @@ -26,15 +30,13 @@ <table style="font-size: x-small"> <?php - - $attributes = $this->data['attributes']; foreach ($attributes AS $name => $value) { if (isset($this->data['attribute_' . htmlspecialchars(strtolower($name)) ])) { $name = $this->data['attribute_' . htmlspecialchars(strtolower($name))]; } - + $name = $this->t('attribute_'.strtolower($name), true); // translate if (sizeof($value) > 1) { echo '<tr><td>' . htmlspecialchars($name) . '</td><td><ul>'; foreach ($value AS $v) {