Commit a90fd3d6 authored by Martin van Es's avatar Martin van Es
Browse files

Improve explanations

parent 30288798
composer.json
composer.lock
CONTRIBUTING.md
COPYING
LICENSE
package-lock.json
package.json
README.org
SECURITY.md
TESTING.md
webpack.config.js
attributemap/
bin/
cert/
config-templates/
config/
dictionaries/
docs/
extra/
lib/
locales/
log/
metadata-templates/
metadata/
modules/
phpcs.xml
phpunit.xml
routing/
schemas/
src/
templates/
tests/
vendor/
www/
......@@ -99,7 +99,7 @@
user = this.value;
for (let key in users[user]) {
attribute = users[user][key];
attributes += "<input id=chkbx_" + key + " type=checkbox name=keys[" + key + "] " + (keys[key]?'checked':'') + " value='" + users[user][key] + "'><span title=\"" + message[key] + "\">" + key + "</span><br>\n";
attributes += "<input id=chkbx_" + key + " type=checkbox name=keys[" + key + "] " + (keys[key]?'checked':'') + " value='" + users[user][key] + "'><span title='" + message[key] + "'>" + key + "</span><br>\n";
};
$('#explanation').html(explanations[user]);
$('#attributes').html(attributes);
......
......@@ -37,7 +37,10 @@ if (!preg_match('@State=(.*)@', $returnTo, $matches)) {
// our list of users.
$raw_users = json_decode(file_get_contents('/opt/simplesamlphp/config/logins.json'), true);
$attributes = json_decode(file_get_contents('/opt/simplesamlphp/config/attributes.json'), true);
$attr_raw = json_decode(file_get_contents('/opt/simplesamlphp/config/attributes.json'), true);
foreach($attr_raw as $attribute => $value) {
$attributes[$attribute] = htmlentities($value, ENT_QUOTES);
}
$users = [];
$explanations = [];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment