1 <?
php $this->includeAtTemplateBase(
'includes/header.php'); ?>
5 function setConsentText(consentStatus, show_spid) {
6 document.getElementById(
"consentText" + show_spid).innerHTML = consentStatus;
34 background-
color: #888888;
39 background-
color: #aaaaaa;
53 <!-- <h2><?
php if (isset($this->
data[
'header'])) {
echo $this->t($this->
data[
'header']); }
else {
echo "Some error occurred"; } ?></h2> -->
54 <h2><?
php echo $this->t(
'{consentAdmin:consentadmin:consentadmin_header}') ?></h2>
56 <?
php echo $this->t(
'{consentAdmin:consentadmin:consentadmin_description1}') ?> </
p>
61 <th width=
"80%"><?
php echo $this->t(
'{consentAdmin:consentadmin:service_provider_header}') ?></th>
62 <th width=
"140"><?
php echo $this->t(
'{consentAdmin:consentadmin:status_header}') ?></th>
65 $spList = $this->
data[
'spList'];
67 $show_text = $this->t(
'{consentAdmin:consentadmin:show}');
68 $hide_text = $this->t(
'{consentAdmin:consentadmin:hide}');
70 foreach ($spList AS $spName => $spValues) {
71 $this->getTranslator()->includeInlineTranslation(
'spname', $spValues[
'name']);
72 $this->getTranslator()->includeInlineTranslation(
'spdescription', $spValues[
'description']);
73 if (!is_null($spValues[
'serviceurl'])) {
74 $htmlSpName =
'<a href="' . $spValues[
'serviceurl'] .
'" style="color: black; font-weight: bold;">' . htmlspecialchars($this->t(
'spname', array(),
false,
true)) .
'</a>';
76 $htmlSpName = htmlspecialchars($this->t(
'spname', array(),
false,
true));
78 $spDescription = htmlspecialchars($this->t(
'spdescription',array(),
false,
true));
79 $checkedAttr = $spValues[
'consentStatus'] ==
'ok' ?
'checked="checked"' :
'';
80 $consentValue = $spValues[
'consentValue'];
81 $consentText = $spValues[
'consentStatus'] ==
'changed' ?
"attributes has changed" :
"";
82 $row_class = (
$show_spid % 2) ?
"row0" :
"row1";
84 <tr
class=
"$row_class">
87 <tr
class=
"$row_class"><td><span
class=
'caSPName'><span title=
'$spDescription'>$htmlSpName</span> <span
style=
"font-size: 80%;"onclick=
"javascript:toggleShowAttributes('$show_spid');"><span
id=
'showing_$show_spid'>
$show_text</span><span
id=
'hiding_$show_spid' style=
'display:none;'>
$hide_text</span>
$attributes_text</span></span></td>
88 <tr><td colspan=
"2" class=
"caAttributes"><div
id=
"attributes_$show_spid" style=
"display: none;">
91 if ($this->
data[
'showDescription']) {
92 echo '<p>' . $this->t(
'{consentAdmin:consentadmin:consentadmin_purpose}') .
' ' . $spDescription .
'</p>';
97 if (isset($this->
data[
'attribute_' . htmlspecialchars(strtolower(
$name)) ])) {
98 $name = $this->
data[
'attribute_' . htmlspecialchars(strtolower(
$name))];
100 $name = $this->getTranslator()->getAttributeTranslation(
$name);
101 if (
sizeof($value) > 1) {
102 echo "<li>" . htmlspecialchars(
$name) .
":\n<ul>\n";
103 foreach ($value AS $v) {
104 echo '<li>' . htmlspecialchars($v) .
"</li>\n";
106 echo "</ul>\n</li>\n";
108 echo "<li>" . htmlspecialchars(
$name) .
": " . htmlspecialchars($value[0]) .
"</li>\n";
117 <td
class=
'caAllowed'><
input onclick=
"javascript:checkConsent(this.value, $show_spid, this.checked)" value=
'$consentValue' type=
'checkbox' $checkedAttr /><span
id=
"consentText$show_spid">$consentText</span></td>
126 <?
php echo $this->t(
'{consentAdmin:consentadmin:consentadmin_description2}') ?> </
p>
130 <
p><
a href=
"<?php echo \SimpleSAML\Module::getModuleURL('consentAdmin/consentAdmin.php', array('logout' => 1)); ?>">Logout</
a></
p>
132 <?
php $this->includeAtTemplateBase(
'includes/footer.php');
if(PHP_SAPI !='cli') color
if(array_key_exists('yes', $_REQUEST)) $attributes