|
63 | 63 | <span class="help-block">Your email will only be used for account recovery</span> |
64 | 64 | </div> |
65 | 65 |
|
66 | | - <div class="form-group"> |
| 66 | + <div class="checkbox"> |
| 67 | + <label> |
| 68 | + <input type="checkbox" name="connectExternalWebId" value="true" id="ConnectExternalWebId" {{#if connectExternalWebId}}checked{{/if}}/> |
| 69 | + Connect to External WebID (<strong>Advanced feature</strong> {{ connectExternalWebId ? "true" : "false" }}) |
| 70 | + </label> |
| 71 | + </div> |
| 72 | + |
| 73 | + <div class="form-group hidden" id="ExternalWebId"> |
67 | 74 | <label class="control-label" for="externalWebId">External WebID:</label> |
68 | 75 | <input type="text" class="form-control" name="externalWebId" id="externalWebId" value="{{externalWebId}}"/> |
69 | 76 | <span class="help-block"> |
70 | | - We will generate a Web ID when you register, but if you already have a Web ID hosted elsewhere that you'd prefer to use to log in, enter it here |
| 77 | + By connecting this account with an existing webId, you can use that webId to authenticate with the new account. |
71 | 78 | </span> |
72 | 79 | </div> |
73 | 80 |
|
74 | 81 | {{#if enforceToc}} |
75 | 82 | {{#if tocUri}} |
76 | 83 | <div class="checkbox"> |
77 | 84 | <label> |
78 | | - <input type="checkbox" name="acceptToc" value="true" {{acceptToc ? "checked" : ""}}> |
| 85 | + <input type="checkbox" name="acceptToc" value="true" {{#if acceptToc}}checked{{/if}}> |
79 | 86 | I agree to the <a href="{{tocUri}}" target="_blank">Terms & Conditions</a> of this service |
80 | 87 | </label> |
81 | 88 | </div> |
|
114 | 121 | <script> |
115 | 122 | var username = document.getElementById('username'); |
116 | 123 | username.onkeyup = function() { |
117 | | - var list = document.getElementsByClassName('editable-username'); |
118 | | - for (let item of list) { |
119 | | - item.innerHTML = username.value.toLowerCase() |
| 124 | + var list = document.getElementsByClassName('editable-username'); |
| 125 | + for (let item of list) { |
| 126 | + item.innerHTML = username.value.toLowerCase() |
| 127 | + } |
120 | 128 | } |
121 | | -} |
| 129 | +
|
| 130 | + window.addEventListener('DOMContentLoaded', function () { |
| 131 | + var connect = document.getElementById('ConnectExternalWebId') |
| 132 | + var container = document.getElementById('ExternalWebId') |
| 133 | + container.classList.toggle('hidden', !connect.checked) |
| 134 | + connect.addEventListener('change', function () { |
| 135 | + container.classList.toggle('hidden', !connect.checked) |
| 136 | + }) |
| 137 | + }) |
122 | 138 | </script> |
123 | 139 |
|
0 commit comments