Commit 1b798905 authored by Fabian van den Broek's avatar Fabian van den Broek

WIP still to add: attributes & JWT in Cookies.

parent 51191224
This diff is collapsed.
<!DOCTYPE html>
<html lang="nl">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="https://privacybydesign.foundation/tomcat/irma_api_server/client/irma.js"></script>
<script type="text/javascript" src="js.cookie.js"></script>
<title> Basis attributen laden met iDIN </title>
<script type="text/javascript" src="jquery-3.2.0.js"></script>
<!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>-->
<script type="text/javascript" src="iDIN-enroll.js"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-xs-12 col-md-8 col-lg-6 col-md-offset-2 col-lg-offset-3">
<h2>Beschikbare iDIN attributen</h2>
<div id="alert_box"></div>
<p>De volgende attributen kunnen gedownload worden:</p>
<table class="table" id="attributeTable">
<tbody></tbody>
</table>
<p>Klik de Laad attributen knop om deze attributen in je IRMA app te laden.</p>
<button id="enroll" class="btn btn-primary">Laad attributen in IRMA app</button>
<hr />
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
$(function() {
//TODO: make an array over which to loop
addTableLine("stad",Cookies.get("city"));
function addTableLine(head, data){
console.log("addLine");
$('#attributeTable')
.append($('<tr>')
.append($('<th>').text(head).attr("scope","row"))
.append($('<td>').text(data)
)
);
}
});
\ No newline at end of file
......@@ -26,7 +26,32 @@ $(function() {
console.log(jqXHR, status, error);
}
getBanks()
//retrieve banks and populate drop down
getBanks();
//enable continue button when a bank is selected
$('#bank-select').on('change', function () {
$('#continue').prop('disabled', this.value==='default');
});
//set correct URL for continue button
$('#form').submit(function(event) {
console.log("submit pressed");
event.preventDefault();
var issuerID = $("#bank-select").prop("value");
$.ajax({
type: "POST",
url: server + "/start",
data: issuerID,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
success: function(data){
console.log("redirect to: " + data);
window.location.replace(data);
},
error: error
});
});
});
......@@ -11,14 +11,17 @@
<title> Basis attributen laden met iDIN </title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery-3.2.0.js"></script>
<!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>-->
<script type="text/javascript" src="iDIN.js"></script>
</head>
<body>
<select id="bank-select">
<option>Choose a bank</option>
</select>
<form id='form' method="post">
<select form='form' id="bank-select">
<option value="default">Choose a bank</option>
</select>
<input type="submit" id="continue" value="Ga naar bank" disabled="true" form='form'>
</form>
</body>
</html>
\ No newline at end of file
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