Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp-module-elixir
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp-module-elixir
Commits
42de665a
Unverified
Commit
42de665a
authored
6 years ago
by
Pavel Vyskočil
Browse files
Options
Downloads
Patches
Plain Diff
Removed present_attributes() method from consentform.php
parent
2c14a9f9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+2
-0
2 additions, 0 deletions
CHANGELOG.md
themes/elixir/consent/consentform.php
+0
-91
0 additions, 91 deletions
themes/elixir/consent/consentform.php
with
2 additions
and
91 deletions
CHANGELOG.md
+
2
−
0
View file @
42de665a
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.
## [Unreleased]
## [Unreleased]
[Removed]
-
Removed present_attributes() method from consentform.php
## [v1.2.1]
## [v1.2.1]
[Fixed]
[Fixed]
...
...
This diff is collapsed.
Click to expand it.
themes/elixir/consent/consentform.php
+
0
−
91
View file @
42de665a
...
@@ -94,97 +94,6 @@ if ($this->data['sppp'] !== false) {
...
@@ -94,97 +94,6 @@ if ($this->data['sppp'] !== false) {
echo
"</p>"
;
echo
"</p>"
;
}
}
/**
* Recursive attribute array listing function
*
* @param SimpleSAML_XHTML_Template $t Template object
* @param array $attributes Attributes to be presented
* @param string $nameParent Name of parent element
*
* @return string HTML representation of the attributes
*/
function
present_attributes
(
$t
,
$attributes
,
$nameParent
)
{
$i
=
0
;
$summary
=
'summary="'
.
$t
->
t
(
'{consent:consent:table_summary}'
)
.
'"'
;
if
(
strlen
(
$nameParent
)
>
0
)
{
$parentStr
=
strtolower
(
$nameParent
)
.
'_'
;
$str
=
'<table class="table attributes" '
.
$summary
.
'>'
;
}
else
{
$parentStr
=
''
;
$str
=
'<table id="table_with_attributes" class="table attributes" '
.
$summary
.
'>'
;
$str
.
=
"
\n
"
.
'<caption>'
.
$t
->
t
(
'{consent:consent:table_caption}'
)
.
'</caption>'
;
}
foreach
(
$attributes
as
$name
=>
$value
)
{
$nameraw
=
$name
;
$name
=
$t
->
getAttributeTranslation
(
$parentStr
.
$nameraw
);
if
(
preg_match
(
'/^child_/'
,
$nameraw
))
{
// insert child table
$parentName
=
preg_replace
(
'/^child_/'
,
''
,
$nameraw
);
foreach
(
$value
as
$child
)
{
$str
.
=
"
\n
"
.
'<tr class="odd"><td style="padding: 2em">'
.
present_attributes
(
$t
,
$child
,
$parentName
)
.
'</td></tr>'
;
}
}
else
{
// insert values directly
$str
.
=
"
\n
"
.
'<tr><td><span class="attrname">'
.
htmlspecialchars
(
$name
)
.
'</span>'
;
$isHidden
=
in_array
(
$nameraw
,
$t
->
data
[
'hiddenAttributes'
],
true
);
if
(
$isHidden
)
{
$hiddenId
=
SimpleSAML\Utils\Random
::
generateID
();
$str
.
=
'<div class="attrvalue" style="display: none;" id="hidden_'
.
$hiddenId
.
'">'
;
}
else
{
$str
.
=
'<div class="attrvalue">'
;
}
if
(
sizeof
(
$value
)
>
1
)
{
// we hawe several values
$str
.
=
'<ul>'
;
foreach
(
$value
as
$listitem
)
{
if
(
$nameraw
===
'jpegPhoto'
)
{
$str
.
=
'<li><img src="data:image/jpeg;base64,'
.
htmlspecialchars
(
$listitem
)
.
'" alt="User photo" /></li>'
;
}
else
{
$str
.
=
'<li>'
.
htmlspecialchars
(
$listitem
)
.
'</li>'
;
}
}
$str
.
=
'</ul>'
;
}
elseif
(
isset
(
$value
[
0
]))
{
// we hawe only one value
if
(
$nameraw
===
'jpegPhoto'
)
{
$str
.
=
'<img src="data:image/jpeg;base64,'
.
htmlspecialchars
(
$value
[
0
])
.
'" alt="User photo" />'
;
}
else
{
$str
.
=
htmlspecialchars
(
$value
[
0
]);
}
}
// end of if multivalue
$str
.
=
'</div>'
;
if
(
$isHidden
)
{
$str
.
=
'<div class="attrvalue consent_showattribute" id="visible_'
.
$hiddenId
.
'">'
;
$str
.
=
'... '
;
$str
.
=
'<a class="consent_showattributelink" href="javascript:SimpleSAML_show(\'hidden_'
.
$hiddenId
;
$str
.
=
'\'); SimpleSAML_hide(\'visible_'
.
$hiddenId
.
'\');">'
;
$str
.
=
$t
->
t
(
'{consent:consent:show_attribute}'
);
$str
.
=
'</a>'
;
$str
.
=
'</div>'
;
}
$str
.
=
'</td></tr>'
;
}
// end else: not child table
}
// end foreach
$str
.
=
isset
(
$attributes
)
?
'</table>'
:
''
;
return
$str
;
}
echo
'<h3 id="attributeheader">'
.
echo
'<h3 id="attributeheader">'
.
$this
->
t
(
$this
->
t
(
'{consent:consent:consent_attributes_header}'
,
'{consent:consent:consent_attributes_header}'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment