keycloak-theme-pirati/account/account.ftl

88 lines
3.2 KiB
Plaintext

<#import "template.ftl" as layout>
<@layout.mainLayout active='account' bodyClass='user'; section>
<div class="row">
<div class="col-md-10">
<h2>${msg("account")}</h2>
</div>
<div class="col-md-2 subtitle">
<span class="subtitle"><span class="required">*</span> ${msg("requiredFields")}</span>
</div>
</div>
<form action="${url.accountUrl}" class="form-horizontal" method="post">
<input type="hidden" id="stateChecker" name="stateChecker" value="${stateChecker}">
<#if !realm.registrationEmailAsUsername>
<div class="form-group ${messagesPerField.printIfExists('username','has-error')}">
<div class="col-sm-2 col-md-2">
<label for="username" class="control-label">${msg("username")}<#if realm.editUsernameAllowed> <span
class="required">*</span></#if></label>
</div>
<div class="col-sm-10 col-md-10">
<input type="text" class="form-control" id="username" name="username"
<#if !realm.editUsernameAllowed>disabled="disabled"</#if> value="${(account.username!'')}"/>
</div>
</div>
</#if>
<div class="form-group ${messagesPerField.printIfExists('email','has-error')}">
<div class="col-sm-2 col-md-2">
<label for="email" class="control-label">${msg("email")} <span class="required">*</span></label>
</div>
<div class="col-sm-10 col-md-10">
<input type="text" class="form-control" id="email" name="email" autofocus
value="${(account.email!'')}"/>
</div>
</div>
<div class="form-group ${messagesPerField.printIfExists('firstName','has-error')}">
<div class="col-sm-2 col-md-2">
<label for="firstName" class="control-label">${msg("firstName")} <span class="required">*</span></label>
</div>
<div class="col-sm-10 col-md-10">
<input type="text" class="form-control" id="firstName" name="firstName"
value="${(account.firstName!'')}"/>
</div>
</div>
<div class="form-group ${messagesPerField.printIfExists('lastName','has-error')}">
<div class="col-sm-2 col-md-2">
<label for="lastName" class="control-label">${msg("lastName")} <span class="required">*</span></label>
</div>
<div class="col-sm-10 col-md-10">
<input type="text" class="form-control" id="lastName" name="lastName" value="${(account.lastName!'')}"/>
</div>
</div>
<#switch account.attributes.type!>
<#case "member">
<div class="form-group">
<div class="col-sm-2 col-md-2">
<label for="user.attributes.postcode" class="control-label">PSČ <span class="required">*</span></label>
</div>
<div class="col-sm-10 col-md-10">
<input type="text" class="form-control" id="user.attributes.postcode" name="user.attributes.postcode" value="${(account.attributes.postcode!'')}"/>
</div>
</div>
<#break>
</#switch>
<div class="sso-form-buttons">
<#if url.referrerURI??><a href="${url.referrerURI}">${msg("backToApplication")?no_esc}/a></#if>
<button type="submit"
class="sso-form-button sso-form-button-primary"
name="submitAction" value="Save">${msg("doSave")}</button>
<button type="submit"
class="sso-form-button"
name="submitAction" value="Cancel">${msg("doCancel")}</button>
</div>
</form>
</@layout.mainLayout>