select-authenticator.ftl 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <#import "template.ftl" as layout>
  2. <@layout.registrationLayout displayInfo=false; section>
  3. <#if section = "header" || section = "show-username">
  4. <script type="text/javascript">
  5. function fillAndSubmit(authExecId) {
  6. document.getElementById('authexec-hidden-input').value = authExecId;
  7. document.getElementById('kc-select-credential-form').submit();
  8. }
  9. </script>
  10. <#if section = "header">
  11. ${msg("loginChooseAuthenticator")}
  12. </#if>
  13. <#elseif section = "form">
  14. <form id="kc-select-credential-form" class="${properties.kcFormClass!}" action="${url.loginAction}" method="post">
  15. <div class="${properties.kcSelectAuthListClass!}">
  16. <#list auth.authenticationSelections as authenticationSelection>
  17. <div class="${properties.kcSelectAuthListItemClass!}" onclick="fillAndSubmit('${authenticationSelection.authExecId}')">
  18. <div class="${properties.kcSelectAuthListItemIconClass!}">
  19. <i class="${properties['${authenticationSelection.iconCssClass}']!authenticationSelection.iconCssClass} fa-2x"></i>
  20. </div>
  21. <div class="${properties.kcSelectAuthListItemBodyClass!}">
  22. <div class="${properties.kcSelectAuthListItemHeadingClass!}">
  23. ${msg('${authenticationSelection.displayName}')}
  24. </div>
  25. <div class="${properties.kcSelectAuthListItemDescriptionClass!}">
  26. ${msg('${authenticationSelection.helpText}')}
  27. </div>
  28. </div>
  29. <div class="${properties.kcSelectAuthListItemFillClass!}"></div>
  30. <div class="${properties.kcSelectAuthListItemArrowClass!}">
  31. <i class="${properties.kcSelectAuthListItemArrowIconClass!}"></i>
  32. </div>
  33. </div>
  34. </#list>
  35. <input type="hidden" id="authexec-hidden-input" name="authenticationExecution" />
  36. </div>
  37. </form>
  38. </#if>
  39. </@layout.registrationLayout>