-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from szymonpoltorak/DEV-187-UserAccountManage…
…mentTheme Dev 187 user account management theme
- Loading branch information
Showing
22 changed files
with
716 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
auth-server/keycloak-theme/themes/corn/account/account.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<#import "tailwind-template.ftl" as layout> | ||
<#import "common.ftl" as common /> | ||
|
||
<@layout.mainLayout active='account' bodyClass='user'; section> | ||
|
||
<div class="flex justify-between items-center px-6 pb-4 border-b border-gray-300"> | ||
<h2 class="text-3xl font-bold">${msg("editAccountHtmlTitle")}</h2> | ||
<div class="text-sm"> | ||
<@common.RED_STAR /> | ||
<span>${msg("requiredFields")}</span> | ||
</div> | ||
</div> | ||
|
||
<div class="pt-4"> | ||
<form action="${url.accountUrl}" class="grid gap-2" method="post"> | ||
|
||
<input type="hidden" id="stateChecker" name="stateChecker" value="${stateChecker}"> | ||
|
||
<#if !realm.registrationEmailAsUsername> | ||
<div> | ||
<div> | ||
<label for="username">${msg("username")}</label> | ||
<@common.RED_STAR /> | ||
<#if messagesPerField.existsError('username')> | ||
<span class="text-red-500"> | ||
${kcSanitize(messagesPerField.getFirstError('username'))?no_esc} | ||
</span> | ||
</#if> | ||
</div> | ||
|
||
<@common.DARK_INPUT | ||
tabindex="0" type="text" | ||
placeholder="${msg('username')}" | ||
id="username" name="username" | ||
value="${(account.username!'')}" | ||
disabled="${(!(realm.editUsernameAllowed))?string('true', 'false')}" | ||
/> | ||
</div> | ||
</#if> | ||
|
||
<div> | ||
<div> | ||
<label for="email">${msg("email")}</label> | ||
<@common.RED_STAR /> | ||
<#if messagesPerField.existsError('email')> | ||
<span class="text-red-500"> | ||
${kcSanitize(messagesPerField.getFirstError('email'))?no_esc} | ||
</span> | ||
</#if> | ||
</div> | ||
<@common.DARK_INPUT | ||
tabindex="0" type="text" | ||
placeholder="${msg('email')}" | ||
id="email" name="email" | ||
value="${(account.email!'')}" | ||
/> | ||
</div> | ||
|
||
<div> | ||
<div> | ||
<label for="firstName">${msg("firstName")}</label> | ||
<@common.RED_STAR /> | ||
<#if messagesPerField.existsError('firstName')> | ||
<span class="text-red-500"> | ||
${kcSanitize(messagesPerField.getFirstError('firstName'))?no_esc} | ||
</span> | ||
</#if> | ||
</div> | ||
<@common.DARK_INPUT | ||
tabindex="0" type="text" | ||
placeholder="${msg('firstName')}" | ||
id="firstName" name="firstName" | ||
value="${(account.firstName!'')}" | ||
/> | ||
</div> | ||
|
||
<div> | ||
<div> | ||
<label for="lastName">${msg("lastName")}</label> | ||
<@common.RED_STAR /> | ||
<#if messagesPerField.existsError('lastName')> | ||
<span class="text-red-500"> | ||
${kcSanitize(messagesPerField.getFirstError('lastName'))?no_esc} | ||
</span> | ||
</#if> | ||
</div> | ||
<@common.DARK_INPUT | ||
tabindex="0" type="text" | ||
placeholder="${msg('lastName')}" | ||
id="lastName" name="lastName" | ||
value="${(account.lastName!'')}" | ||
/> | ||
</div> | ||
|
||
<div class="grid gap-4 pt-2"> | ||
<@common.YELLOW_BUTTON tabindex="" type="submit" name="submitAction" id="kc-login" value="Save"> | ||
${msg("doSave")} | ||
</@common.YELLOW_BUTTON> | ||
<@common.WHITE_BUTTON tabindex="" type="submit" name="submitAction" id="kc-login" value="Cancel"> | ||
${msg("doCancel")} | ||
</@common.WHITE_BUTTON> | ||
</div> | ||
|
||
</form> | ||
</div> | ||
|
||
</@layout.mainLayout> |
78 changes: 78 additions & 0 deletions
78
auth-server/keycloak-theme/themes/corn/account/applications.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<#import "tailwind-template.ftl" as layout> | ||
<#import "common.ftl" as common /> | ||
|
||
<@layout.mainLayout active='applications' bodyClass='applications'; section> | ||
|
||
<div class="flex justify-between items-center px-6 pb-4 border-b border-gray-300"> | ||
<h2 class="text-3xl font-bold">${msg("applicationsHtmlTitle")}</h2> | ||
</div> | ||
|
||
<div class="pt-4"> | ||
<form action="${url.applicationsUrl}" method="post"> | ||
<input type="hidden" id="stateChecker" name="stateChecker" value="${stateChecker}"> | ||
<input type="hidden" id="referrer" name="referrer" value="${stateChecker}"> | ||
|
||
<table class="min-w-full divide-y divide-gray-200 bg-yellowishDark100"> | ||
<thead> | ||
<tr class="text-left text-xs font-medium text-gray-200 uppercase tracking-wider"> | ||
<th class="px-3 py-3">${msg("application")}</th> | ||
<th class="px-3 py-3">${msg("availableRoles")}</th> | ||
<th class="px-3 py-3">${msg("grantedPermissions")}</th> | ||
<th class="px-3 py-3">${msg("additionalGrants")}</th> | ||
<th class="px-3 py-3">${msg("action")}</th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody class="divide-y divide-gray-200"> | ||
<#list applications.applications as application> | ||
<tr class="text-sm text-white"> | ||
<td class="px-3 py-4"> | ||
<#if application.effectiveUrl?has_content><a href="${application.effectiveUrl}"></#if> | ||
<#if application.client.name?has_content>${advancedMsg(application.client.name)}<#else>${application.client.clientId}</#if> | ||
<#if application.effectiveUrl?has_content></a></#if> | ||
</td> | ||
|
||
<td class="px-3 py-4"> | ||
<#list application.realmRolesAvailable as role> | ||
<#if role.description??>${advancedMsg(role.description)}<#else>${advancedMsg(role.name)}</#if> | ||
<#if role_has_next>, </#if> | ||
</#list> | ||
<#list application.resourceRolesAvailable?keys as resource> | ||
<#if application.realmRolesAvailable?has_content>, </#if> | ||
<#list application.resourceRolesAvailable[resource] as clientRole> | ||
<#if clientRole.roleDescription??>${advancedMsg(clientRole.roleDescription)}<#else>${advancedMsg(clientRole.roleName)}</#if> | ||
${msg("inResource")} <strong><#if clientRole.clientName??>${advancedMsg(clientRole.clientName)}<#else>${clientRole.clientId}</#if></strong> | ||
<#if clientRole_has_next>, </#if> | ||
</#list> | ||
</#list> | ||
</td> | ||
|
||
<td class="px-3 py-4"> | ||
<#if application.client.consentRequired> | ||
<#list application.clientScopesGranted as claim> | ||
${advancedMsg(claim)}<#if claim_has_next>, </#if> | ||
</#list> | ||
<#else> | ||
<strong>${msg("fullAccess")}</strong> | ||
</#if> | ||
</td> | ||
|
||
<td class="px-3 py-4"> | ||
<#list application.additionalGrants as grant> | ||
${advancedMsg(grant)}<#if grant_has_next>, </#if> | ||
</#list> | ||
</td> | ||
|
||
<td class="px-3 py-4"> | ||
<#if (application.client.consentRequired && application.clientScopesGranted?has_content) || application.additionalGrants?has_content> | ||
<button type='submit' class='${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!}' id='revoke-${application.client.clientId}' name='clientId' value="${application.client.id}">${msg("revoke")}</button> | ||
</#if> | ||
</td> | ||
</tr> | ||
</#list> | ||
</tbody> | ||
</table> | ||
</form> | ||
<div> | ||
|
||
</@layout.mainLayout> |
Oops, something went wrong.