|
| 1 | +<#import "template.ftl" as layout> |
| 2 | +<@layout.registrationLayout displayMessage=!messagesPerField.existsError('firstName','lastName','email','username','password','password-confirm'); section> |
| 3 | + <#if section = "header"> |
| 4 | + ${msg("registerTitle")} |
| 5 | + <div id="renku-login-terms-container"> |
| 6 | + <div id="renku-login-terms-text"> |
| 7 | + ${kcSanitize(msg("termsText"))?no_esc} |
| 8 | + </div> |
| 9 | + </div> |
| 10 | + <#elseif section = "form"> |
| 11 | + <form id="kc-register-form" class="${properties.kcFormClass!}" action="${url.registrationAction}" method="post"> |
| 12 | + <div class="${properties.kcFormGroupClass!}"> |
| 13 | + <div class="${properties.kcLabelWrapperClass!}"> |
| 14 | + <label for="firstName" class="${properties.kcLabelClass!}">${msg("firstName")}</label> |
| 15 | + </div> |
| 16 | + <div class="${properties.kcInputWrapperClass!}"> |
| 17 | + <input type="text" id="firstName" class="${properties.kcInputClass!}" name="firstName" |
| 18 | + value="${(register.formData.firstName!'')}" |
| 19 | + aria-invalid="<#if messagesPerField.existsError('firstName')>true</#if>" |
| 20 | + /> |
| 21 | + |
| 22 | + <#if messagesPerField.existsError('firstName')> |
| 23 | + <span id="input-error-firstname" class="${properties.kcInputErrorMessageClass!}" aria-live="polite"> |
| 24 | + ${kcSanitize(messagesPerField.get('firstName'))?no_esc} |
| 25 | + </span> |
| 26 | + </#if> |
| 27 | + </div> |
| 28 | + </div> |
| 29 | + |
| 30 | + <div class="${properties.kcFormGroupClass!}"> |
| 31 | + <div class="${properties.kcLabelWrapperClass!}"> |
| 32 | + <label for="lastName" class="${properties.kcLabelClass!}">${msg("lastName")}</label> |
| 33 | + </div> |
| 34 | + <div class="${properties.kcInputWrapperClass!}"> |
| 35 | + <input type="text" id="lastName" class="${properties.kcInputClass!}" name="lastName" |
| 36 | + value="${(register.formData.lastName!'')}" |
| 37 | + aria-invalid="<#if messagesPerField.existsError('lastName')>true</#if>" |
| 38 | + /> |
| 39 | + |
| 40 | + <#if messagesPerField.existsError('lastName')> |
| 41 | + <span id="input-error-lastname" class="${properties.kcInputErrorMessageClass!}" aria-live="polite"> |
| 42 | + ${kcSanitize(messagesPerField.get('lastName'))?no_esc} |
| 43 | + </span> |
| 44 | + </#if> |
| 45 | + </div> |
| 46 | + </div> |
| 47 | + |
| 48 | + <div class="${properties.kcFormGroupClass!}"> |
| 49 | + <div class="${properties.kcLabelWrapperClass!}"> |
| 50 | + <label for="email" class="${properties.kcLabelClass!}">${msg("email")}</label> |
| 51 | + </div> |
| 52 | + <div class="${properties.kcInputWrapperClass!}"> |
| 53 | + <input type="text" id="email" class="${properties.kcInputClass!}" name="email" |
| 54 | + value="${(register.formData.email!'')}" autocomplete="email" |
| 55 | + aria-invalid="<#if messagesPerField.existsError('email')>true</#if>" |
| 56 | + /> |
| 57 | + |
| 58 | + <#if messagesPerField.existsError('email')> |
| 59 | + <span id="input-error-email" class="${properties.kcInputErrorMessageClass!}" aria-live="polite"> |
| 60 | + ${kcSanitize(messagesPerField.get('email'))?no_esc} |
| 61 | + </span> |
| 62 | + </#if> |
| 63 | + </div> |
| 64 | + </div> |
| 65 | + |
| 66 | + <#if !realm.registrationEmailAsUsername> |
| 67 | + <div class="${properties.kcFormGroupClass!}"> |
| 68 | + <div class="${properties.kcLabelWrapperClass!}"> |
| 69 | + <label for="username" class="${properties.kcLabelClass!}">${msg("username")}</label> |
| 70 | + </div> |
| 71 | + <div class="${properties.kcInputWrapperClass!}"> |
| 72 | + <input type="text" id="username" class="${properties.kcInputClass!}" name="username" |
| 73 | + value="${(register.formData.username!'')}" autocomplete="username" |
| 74 | + aria-invalid="<#if messagesPerField.existsError('username')>true</#if>" |
| 75 | + /> |
| 76 | + |
| 77 | + <#if messagesPerField.existsError('username')> |
| 78 | + <span id="input-error-username" class="${properties.kcInputErrorMessageClass!}" aria-live="polite"> |
| 79 | + ${kcSanitize(messagesPerField.get('username'))?no_esc} |
| 80 | + </span> |
| 81 | + </#if> |
| 82 | + </div> |
| 83 | + </div> |
| 84 | + </#if> |
| 85 | + |
| 86 | + <#if passwordRequired??> |
| 87 | + <div class="${properties.kcFormGroupClass!}"> |
| 88 | + <div class="${properties.kcLabelWrapperClass!}"> |
| 89 | + <label for="password" class="${properties.kcLabelClass!}">${msg("password")}</label> |
| 90 | + </div> |
| 91 | + <div class="${properties.kcInputWrapperClass!}"> |
| 92 | + <input type="password" id="password" class="${properties.kcInputClass!}" name="password" |
| 93 | + autocomplete="new-password" |
| 94 | + aria-invalid="<#if messagesPerField.existsError('password','password-confirm')>true</#if>" |
| 95 | + /> |
| 96 | + |
| 97 | + <#if messagesPerField.existsError('password')> |
| 98 | + <span id="input-error-password" class="${properties.kcInputErrorMessageClass!}" aria-live="polite"> |
| 99 | + ${kcSanitize(messagesPerField.get('password'))?no_esc} |
| 100 | + </span> |
| 101 | + </#if> |
| 102 | + </div> |
| 103 | + </div> |
| 104 | + |
| 105 | + <div class="${properties.kcFormGroupClass!}"> |
| 106 | + <div class="${properties.kcLabelWrapperClass!}"> |
| 107 | + <label for="password-confirm" |
| 108 | + class="${properties.kcLabelClass!}">${msg("passwordConfirm")}</label> |
| 109 | + </div> |
| 110 | + <div class="${properties.kcInputWrapperClass!}"> |
| 111 | + <input type="password" id="password-confirm" class="${properties.kcInputClass!}" |
| 112 | + name="password-confirm" |
| 113 | + aria-invalid="<#if messagesPerField.existsError('password-confirm')>true</#if>" |
| 114 | + /> |
| 115 | + |
| 116 | + <#if messagesPerField.existsError('password-confirm')> |
| 117 | + <span id="input-error-password-confirm" class="${properties.kcInputErrorMessageClass!}" aria-live="polite"> |
| 118 | + ${kcSanitize(messagesPerField.get('password-confirm'))?no_esc} |
| 119 | + </span> |
| 120 | + </#if> |
| 121 | + </div> |
| 122 | + </div> |
| 123 | + </#if> |
| 124 | + |
| 125 | + <#if recaptchaRequired??> |
| 126 | + <div class="form-group"> |
| 127 | + <div class="${properties.kcInputWrapperClass!}"> |
| 128 | + <div class="g-recaptcha" data-size="compact" data-sitekey="${recaptchaSiteKey}"></div> |
| 129 | + </div> |
| 130 | + </div> |
| 131 | + </#if> |
| 132 | + |
| 133 | + <div class="${properties.kcFormGroupClass!}"> |
| 134 | + <div id="kc-form-options" class="${properties.kcFormOptionsClass!}"> |
| 135 | + <div class="${properties.kcFormOptionsWrapperClass!}"> |
| 136 | + <span><a href="${url.loginUrl}">${kcSanitize(msg("backToLogin"))?no_esc}</a></span> |
| 137 | + </div> |
| 138 | + </div> |
| 139 | + |
| 140 | + <div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}"> |
| 141 | + <input class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}" type="submit" value="${msg("doRegister")}"/> |
| 142 | + </div> |
| 143 | + </div> |
| 144 | + </form> |
| 145 | + </#if> |
| 146 | +</@layout.registrationLayout> |
0 commit comments