From a12919a1d590da10d28835e2a4e904c4f8842c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no> Date: Wed, 29 Oct 2008 08:42:07 +0000 Subject: [PATCH] Adding purpose description to consent module (used in wayf) git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@953 44740490-163a-0410-bde0-09ae8108e29a --- .../consent/templates/default/consentform.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/modules/consent/templates/default/consentform.php b/modules/consent/templates/default/consentform.php index 6931dfd43..a9df63cf8 100644 --- a/modules/consent/templates/default/consentform.php +++ b/modules/consent/templates/default/consentform.php @@ -46,6 +46,16 @@ if (array_key_exists('name', $this->data['dstMetadata'])) { $dstName = $this->data['dstMetadata']['entityid']; } +$spPurpose = 'unspecified'; +if (array_key_exists('descr_purpose', $this->data['dstMetadata'])) { + $spPurpose = $this->data['dstMetadata']['descr_purpose']; + if (is_array($spPurpose)) { + $spPurpose = $this->t($spPurpose); + } +} + + + $attributes = $this->data['attributes']; @@ -55,8 +65,12 @@ $this->includeAtTemplateBase('includes/header.php'); <div id="content"> <p> -<?php echo $this->t('{consent:consent_notice}'); ?> <strong><?php echo htmlspecialchars($dstName); ?></strong>. -<?php echo $this->t('{consent:consent_accept}', array('IDPNAME' => htmlspecialchars($srcName))) ?> +<!-- notice:<?php echo $this->t('{consent:consent_notice}'); ?> <strong><?php echo htmlspecialchars($dstName); ?></strong>. --> +<?php echo $this->t('{consent:consent_accept}', array( + 'IDPNAME' => $srcName, + 'SPNAME' => $dstName, + 'SPDESC' => $spPurpose, +)) ?> </p> <?php -- GitLab