Commit 69de1654 authored by Fabian van den Broek's avatar Fabian van den Broek
Browse files

age limits gesplitst van iDIN attributen

parent 4ce3eb8c
......@@ -30,12 +30,17 @@
</a>
</div>
<div class="col-xs-12 col-md-8 col-lg-6 col-md-offset-2 col-lg-offset-3">
<h2>Beschikbare iDIN attributen</h2>
<h2>Beschikbare attributen</h2>
<div id="alert_box"></div>
<p>De volgende zijn beschikbaar gesteld door uw bank:</p>
<table class="table" id="attributeTable">
<p>De volgende attributen zijn beschikbaar gesteld door uw bank:</p>
<table class="table" id="idinTable">
<tbody></tbody>
</table>
<br/>
<p>De volgende attributen zijn daaruit afgeleid:</p>
<table class="table" id="ageTable">
<tbody></tbody>
</table>
......
......@@ -19,10 +19,10 @@ $(function() {
var doneURL = "done.html";
function addTableLine(head, data){
function addTableLine(table, head, data){
if (data !== null) {
$('#attributeTable')
.append($('<tr>')
//$('#attributeTable')
table.append($('<tr>')
.append($('<th>').text(head).attr("scope", "row"))
.append($('<td>').text(data)
)
......@@ -30,11 +30,18 @@ $(function() {
}
}
function displayAttributes (creds, translator) {
$.each(creds, function(i, cred) {
$.each(cred.attributes, function(key, value) {
addTableLine(translator.hasOwnProperty(key) ? translator[key] : key, value);
});
if (cred.credential === "pbdf.pbdf.idin"){
$.each(cred.attributes, function(key, value) {
addTableLine($('#idinTable'),translator.hasOwnProperty(key) ? translator[key] : key, value);
});
} else {
$.each(cred.attributes, function(key, value) {
addTableLine($('#ageTable'),translator.hasOwnProperty(key) ? translator[key] : key, value);
});
}
});
}
......
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