Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irma_idin_webclient
Commits
1b798905
Commit
1b798905
authored
Mar 22, 2017
by
Fabian van den Broek
Browse files
WIP still to add: attributes & JWT in Cookies.
parent
51191224
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
css/bootstrap.min.css
0 → 100644
View file @
1b798905
This diff is collapsed.
Click to expand it.
enroll.html
0 → 100644
View file @
1b798905
<!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
iDIN-enroll.js
0 → 100644
View file @
1b798905
$
(
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
iDIN.js
View file @
1b798905
...
...
@@ -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
});
});
});
index.html
View file @
1b798905
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment