|
32 | 32 | <!-- <% /* //--> |
33 | 33 | <link rel="stylesheet" href="../../css/authorization.css"> |
34 | 34 | <!-- */ %> //--> |
| 35 | + |
| 36 | + <script> |
| 37 | + function cascadeDependency(src, dst) { |
| 38 | + const srcElem = document.getElementById(src); |
| 39 | + const dstElem = document.getElementById(dst); |
| 40 | +
|
| 41 | + dstElem.disabled = !srcElem.checked |
| 42 | + } |
| 43 | +
|
| 44 | + function cascadeAuthorizationCodeGrantIncluded() { |
| 45 | + cascadeDependency("authorizationCodeGrantIncluded", "issuerStateIncluded"); |
| 46 | + } |
| 47 | +
|
| 48 | + function cascadePreAuthorizedCodeGrantIncluded() { |
| 49 | + cascadeDependency("preAuthorizedCodeGrantIncluded", "userPinRequired"); |
| 50 | + cascadeDependency("preAuthorizedCodeGrantIncluded", "userPinLength"); |
| 51 | + } |
| 52 | +
|
| 53 | + window.onload = function() { |
| 54 | + cascadeAuthorizationCodeGrantIncluded(); |
| 55 | + cascadePreAuthorizedCodeGrantIncluded(); |
| 56 | +
|
| 57 | + document.getElementById("authorizationCodeGrantIncluded") |
| 58 | + .addEventListener('click', cascadeAuthorizationCodeGrantIncluded); |
| 59 | + document.getElementById("preAuthorizedCodeGrantIncluded") |
| 60 | + .addEventListener('click', cascadePreAuthorizedCodeGrantIncluded); |
| 61 | + }; |
| 62 | + </script> |
35 | 63 | </head> |
36 | 64 | <body class="font-default"> |
37 | 65 | <div id="page_title">Credential Offer</div> |
|
40 | 68 | <form id="credential-offer-form" action="/api/offer/issue" method="POST"> |
41 | 69 | <c:if test="${model.user == null}"> |
42 | 70 | <div class="indent"> |
43 | | - <h4 id="authorization">Authorization</h4> |
| 71 | + <h4 id="authorization">Login</h4> |
44 | 72 | <div class="indent"> |
45 | | - <p>Do you grant authorization to the application?</p> |
46 | | - |
47 | 73 | <div id="login-fields" class="indent"> |
48 | 74 | <div id="login-prompt">Input Login ID and Password.</div> |
49 | 75 | <input type="text" id="loginId" name="loginId" placeholder="Login ID" |
|
66 | 92 | <td><label for="authorizationCodeGrantIncluded">Authorization code grant included</label></td> |
67 | 93 | <td> |
68 | 94 | <input type="checkbox" id="authorizationCodeGrantIncluded" name="authorizationCodeGrantIncluded" |
69 | | - <c:if test="${model.authorizationCodeGrantIncluded}">checked</c:if> class="font-default"> |
| 95 | + <c:if test="${model.authorizationCodeGrantIncluded}">checked</c:if> class="font-default"> |
70 | 96 | </td> |
71 | 97 | </tr> |
72 | 98 | <tr> |
73 | | - <td><label for="issuerStateIncluded">Issuer state included</label></td> |
| 99 | + <td><div class="indent"><label for="issuerStateIncluded">Issuer state included</label></div></td> |
74 | 100 | <td> |
75 | 101 | <input type="checkbox" id="issuerStateIncluded" name="issuerStateIncluded" |
76 | 102 | <c:if test="${model.issuerStateIncluded}">checked</c:if> class="font-default"> |
77 | 103 | </td> |
78 | 104 | </tr> |
| 105 | + <tr></tr> |
79 | 106 | <tr> |
80 | 107 | <td><label for="preAuthorizedCodeGrantIncluded">Pre-authorized code grant included</label></td> |
81 | 108 | <td> |
|
84 | 111 | </td> |
85 | 112 | </tr> |
86 | 113 | <tr> |
87 | | - <td><label for="userPinRequired">User pin required</label></td> |
| 114 | + <td><div class="indent"><label for="userPinRequired">User pin required</label></div></td> |
88 | 115 | <td> |
89 | 116 | <input type="checkbox" id="userPinRequired" name="userPinRequired" |
90 | 117 | <c:if test="${model.userPinRequired}">checked</c:if> class="font-default"> |
91 | 118 | </td> |
92 | 119 | </tr> |
93 | 120 | <tr> |
94 | | - <td><label for="userPinRequired">User pin length</label></td> |
| 121 | + <td><div class="indent"><label for="userPinLength">User pin length</label></div></td> |
95 | 122 | <td> |
96 | | - <input type="number" id="userPinLength" name="userPinLength" value="${model.userPinLength}" class="font-default"> |
| 123 | + <input type="number" id="userPinLength" name="userPinLength" value="${model.userPinLength}" |
| 124 | + min="0" max="8" class="font-default"> |
97 | 125 | </td> |
98 | 126 | </tr> |
| 127 | + <tr></tr> |
99 | 128 | <tr> |
100 | 129 | <td><label for="credentials">Credentials</label></td> |
101 | 130 | <td> |
|
106 | 135 | <td><label for="credentialOfferEndpoint">Credential offer endpoint</label></td> |
107 | 136 | <td> |
108 | 137 | <input type="text" id="credentialOfferEndpoint" name="credentialOfferEndpoint" |
109 | | - value="${model.credentialOfferEndpoint}" class="font-default"> |
| 138 | + value="${model.credentialOfferEndpoint}" size="40" class="font-default"> |
110 | 139 | </td> |
111 | 140 | </tr> |
112 | 141 | </table> |
|
0 commit comments