Skip to content

Commit e9e94fd

Browse files
committed
Show link to registration page when no inflow registration is allowed
1 parent 956b6c9 commit e9e94fd

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

templates/authentication.tpl.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
<input type='hidden' id='operation' name='operation' value='AUTH'/>
1919
<button type='button' id='authformSubmit'><?php echo htmlspecialchars($this->t('{webauthn:webauthn:authTokenButton}')); ?></button>
2020
</form>
21+
<?php else: ?>
22+
<p>Please first register your token on the <a href="<?php echo htmlspecialchars(SimpleSAML\Module::getModuleURL('webauthn/registration.php')); ?>">registration page</a> before continuing.
2123
<?php endif; ?>
2224
<script src="<?php echo htmlspecialchars(SimpleSAML\Module::getModuleUrl('webauthn/')); ?>assets/js/webauthn.js"></script>
2325
<script src="<?php echo htmlspecialchars(SimpleSAML\Module::getModuleUrl('webauthn/')); ?>assets/js/authentication.js"></script>

templates/authentication.twig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<input type='hidden' id='operation' name='operation' value='AUTH'/>
2020
<button type='button' id='authformSubmit'>{{ '{webauthn:webauthn:authTokenButton}'|trans }}</button>
2121
</form>
22+
{% else %}
23+
<p>Please first register your token on the <a href="{{ moduleURL('webauthn/registration.php') }}">registration page</a> before continuing.
2224
{% endif %}
2325
<script src="{{ asset('js/webauthn.js', 'webauthn') }}"></script>
2426
<script src="{{ asset('js/authentication.js', 'webauthn') }}"></script>

0 commit comments

Comments
 (0)