-
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.
- Loading branch information
Showing
8 changed files
with
307 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
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,6 @@ | ||
{ | ||
"themes": [{ | ||
"name" : "booking", | ||
"types": [ "login" ] | ||
}] | ||
} |
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,109 @@ | ||
<#import "resources/template.ftl" as layout> | ||
<@layout.registrationLayout displayMessage=!messagesPerField.existsError('username','password') displayInfo=realm.password && realm.registrationAllowed && !registrationDisabled??; section> | ||
<#if section = "header"> | ||
|
||
|
||
<div id="kc-form"> | ||
|
||
<div id="kc-form-wrapper" style="margin: 0 auto"> | ||
<#if realm.password> | ||
<form id="kc-form-login" onsubmit="login.disabled = true; return true;" action="${url.loginAction}" method="post"> | ||
<#if !usernameHidden??> | ||
<div class="${properties.kcFormGroupClass!}"> | ||
<label for="username" class="${properties.kcLabelClass!}">Oslo felles bruker</label> | ||
|
||
<input tabindex="1" id="username" class="pkt-input username" placeholder="udeXXXXXX" name="username" value="${(login.username!'')}" type="text" autofocus autocomplete="off" | ||
aria-invalid="<#if messagesPerField.existsError('username','password')>true</#if>" | ||
/> | ||
|
||
<#if messagesPerField.existsError('username','password')> | ||
<span id="input-error" class="${properties.kcInputErrorMessageClass!}" aria-live="polite"> | ||
Ugyldig brukernavn eller passord. | ||
</span> | ||
</#if> | ||
|
||
</div> | ||
</#if> | ||
|
||
<div class="${properties.kcFormGroupClass!}"> | ||
<label for="password" class="${properties.kcLabelClass!}">Passord</label> | ||
|
||
<input tabindex="2" id="password" class="pkt-input password" name="password" type="password" autocomplete="off" | ||
aria-invalid="<#if messagesPerField.existsError('username','password')>true</#if>" | ||
/> | ||
|
||
<#if usernameHidden?? && messagesPerField.existsError('username','password')> | ||
<span id="input-error" class="${properties.kcInputErrorMessageClass!}" aria-live="polite"> | ||
${kcSanitize(messagesPerField.getFirstError('username','password'))?no_esc} | ||
</span> | ||
</#if> | ||
|
||
</div> | ||
|
||
<div class="${properties.kcFormGroupClass!} ${properties.kcFormSettingClass!}"> | ||
<div id="kc-form-options"> | ||
<#if realm.rememberMe && !usernameHidden??> | ||
<div class="checkbox"> | ||
<label> | ||
<#if login.rememberMe??> | ||
<input tabindex="3" id="rememberMe" name="rememberMe" type="checkbox" checked> ${msg("rememberMe")} | ||
<#else> | ||
<input tabindex="3" id="rememberMe" name="rememberMe" type="checkbox"> ${msg("rememberMe")} | ||
</#if> | ||
</label> | ||
</div> | ||
</#if> | ||
</div> | ||
<div class="${properties.kcFormOptionsWrapperClass!}"> | ||
<#if realm.resetPasswordAllowed> | ||
<span><a tabindex="5" href="${url.loginResetCredentialsUrl}">${msg("doForgotPassword")}</a></span> | ||
</#if> | ||
</div> | ||
|
||
</div> | ||
|
||
<div id="kc-form-buttons" class="${properties.kcFormGroupClass!}"> | ||
<input type="hidden" id="id-hidden-input" name="credentialId" <#if auth.selectedCredential?has_content>value="${auth.selectedCredential}"</#if>/> | ||
<input tabindex="4" class="pkt-btn submit" name="login" id="kc-login" type="submit" value="Logg inn"/> | ||
</div> | ||
<a href="https://prk-passordbytte.app.oslo.kommune.no/glemt-passord" target="_blank" >Glemt passord?</a> | ||
</form> | ||
</#if> | ||
</div> | ||
|
||
</div> | ||
<#elseif section = "info" > | ||
<#if realm.password && realm.registrationAllowed && !registrationDisabled??> | ||
<div id="kc-registration-container"> | ||
<div id="kc-registration"> | ||
<span>${msg("noAccount")} <a tabindex="6" | ||
href="${url.registrationUrl}">${msg("doRegister")}</a></span> | ||
</div> | ||
</div> | ||
</#if> | ||
<#elseif section = "socialProviders" > | ||
<#if realm.password && social.providers??> | ||
<div id="kc-social-providers" class="${properties.kcFormSocialAccountSectionClass!}"> | ||
<hr/> | ||
<h4>${msg("identity-provider-login-label")}</h4> | ||
|
||
<ul class="${properties.kcFormSocialAccountListClass!} <#if social.providers?size gt 3>${properties.kcFormSocialAccountListGridClass!}</#if>"> | ||
<#list social.providers as p> | ||
<li> | ||
<a id="social-${p.alias}" class="${properties.kcFormSocialAccountListButtonClass!} <#if social.providers?size gt 3>${properties.kcFormSocialAccountGridItem!}</#if>" | ||
type="button" href="${p.loginUrl}"> | ||
<#if p.iconClasses?has_content> | ||
<i class="${properties.kcCommonLogoIdP!} ${p.iconClasses!}" aria-hidden="true"></i> | ||
<span class="${properties.kcFormSocialAccountNameClass!} kc-social-icon-text">${p.displayName!}</span> | ||
<#else> | ||
<span class="${properties.kcFormSocialAccountNameClass!}">${p.displayName!}</span> | ||
</#if> | ||
</a> | ||
</li> | ||
</#list> | ||
</ul> | ||
</div> | ||
</#if> | ||
</#if> | ||
|
||
</@layout.registrationLayout> |
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,37 @@ | ||
body { | ||
font-family: "Oslo Sans", sans-serif; | ||
} | ||
|
||
html body .login-pf-page { | ||
position: relative; | ||
width: 500px; | ||
margin: 200px auto; | ||
} | ||
|
||
.oslo-logo { | ||
height: 90px; | ||
position: absolute; | ||
top: 25px; | ||
left: 25px; | ||
} | ||
|
||
input, button, label, a { | ||
margin-top: 20px; | ||
} | ||
|
||
a, label { | ||
display: inline-block; | ||
} | ||
|
||
.tittel { | ||
font-size: 2rem; | ||
} | ||
|
||
.username, .password { | ||
width: 500px; | ||
} | ||
|
||
.submit { | ||
float: right; | ||
margin-right: 4px; | ||
} |
Binary file not shown.
141 changes: 141 additions & 0 deletions
141
custom-themes/theme/booking/login/resources/template.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,141 @@ | ||
<#macro registrationLayout bodyClass="" displayInfo=false displayMessage=true displayRequiredFields=false> | ||
<!DOCTYPE html> | ||
<html class="${properties.kcHtmlClass!}"<#if realm.internationalizationEnabled> lang="${locale.currentLanguageTag}"</#if>> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | ||
<meta name="robots" content="noindex, nofollow"> | ||
<link href="https://punkt-cdn.oslo.kommune.no/latest/css/pkt.min.css" rel="stylesheet" /> | ||
|
||
<#if properties.styles?has_content> | ||
<#list properties.styles?split(' ') as style> | ||
<link href="${url.resourcesPath}/${style}" rel="stylesheet" /> | ||
</#list> | ||
</#if> | ||
|
||
<title>Origo booking admin</title> | ||
<link rel="icon" href="${url.resourcesPath}/img/favicon.ico" /> | ||
</head> | ||
|
||
<body class="${properties.kcBodyClass!}"> | ||
<img | ||
src="https://punkt-cdn.oslo.kommune.no/latest/logos/oslologo.svg" | ||
alt="Oslo kommune logo" | ||
height="64" | ||
class="oslo-logo" | ||
/> | ||
<div class="${properties.kcLoginClass!}"> | ||
<div id="kc-header" class="${properties.kcHeaderClass!}"> | ||
<h1 id="kc-header-wrapper" class="tittel">Origo booking admin</h1> | ||
</div> | ||
<div class="${properties.kcFormCardClass!}"> | ||
<header class="${properties.kcFormHeaderClass!}"> | ||
<#if realm.internationalizationEnabled && locale.supported?size gt 1> | ||
<div class="${properties.kcLocaleMainClass!}" id="kc-locale"> | ||
<div id="kc-locale-wrapper" class="${properties.kcLocaleWrapperClass!}"> | ||
<div id="kc-locale-dropdown" class="${properties.kcLocaleDropDownClass!}"> | ||
<a href="#" id="kc-current-locale-link">${locale.current}</a> | ||
<ul class="${properties.kcLocaleListClass!}"> | ||
<#list locale.supported as l> | ||
<li class="${properties.kcLocaleListItemClass!}"> | ||
<a class="${properties.kcLocaleItemClass!}" href="${l.url}">${l.label}</a> | ||
</li> | ||
</#list> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</#if> | ||
<#if !(auth?has_content && auth.showUsername() && !auth.showResetCredentials())> | ||
<#if displayRequiredFields> | ||
<div class="${properties.kcContentWrapperClass!}"> | ||
<div class="${properties.kcLabelWrapperClass!} subtitle"> | ||
<span class="subtitle"><span class="required">*</span> ${msg("requiredFields")}</span> | ||
</div> | ||
<div class="col-md-10"> | ||
<h1 id="kc-page-title"><#nested "header"></h1> | ||
</div> | ||
</div> | ||
<#else> | ||
<h1 id="kc-page-title"><#nested "header"></h1> | ||
</#if> | ||
<#else> | ||
<#if displayRequiredFields> | ||
<div class="${properties.kcContentWrapperClass!}"> | ||
<div class="${properties.kcLabelWrapperClass!} subtitle"> | ||
<span class="subtitle"><span class="required">*</span> ${msg("requiredFields")}</span> | ||
</div> | ||
<div class="col-md-10"> | ||
<#nested "show-username"> | ||
<div id="kc-username" class="${properties.kcFormGroupClass!}"> | ||
<label id="kc-attempted-username">${auth.attemptedUsername}</label> | ||
<a id="reset-login" href="${url.loginRestartFlowUrl}" aria-label="${msg("restartLoginTooltip")}"> | ||
<div class="kc-login-tooltip"> | ||
<i class="${properties.kcResetFlowIcon!}"></i> | ||
<span class="kc-tooltip-text">${msg("restartLoginTooltip")}</span> | ||
</div> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
<#else> | ||
<#nested "show-username"> | ||
<div id="kc-username" class="${properties.kcFormGroupClass!}"> | ||
<label id="kc-attempted-username">${auth.attemptedUsername}</label> | ||
<a id="reset-login" href="${url.loginRestartFlowUrl}" aria-label="${msg("restartLoginTooltip")}"> | ||
<div class="kc-login-tooltip"> | ||
<i class="${properties.kcResetFlowIcon!}"></i> | ||
<span class="kc-tooltip-text">${msg("restartLoginTooltip")}</span> | ||
</div> | ||
</a> | ||
</div> | ||
</#if> | ||
</#if> | ||
</header> | ||
<div id="kc-content"> | ||
<div id="kc-content-wrapper"> | ||
|
||
<#-- App-initiated actions should not see warning messages about the need to complete the action --> | ||
<#-- during login. --> | ||
<#if displayMessage && message?has_content && (message.type != 'warning' || !isAppInitiatedAction??)> | ||
<div class="alert-${message.type} ${properties.kcAlertClass!} pf-m-<#if message.type = 'error'>danger<#else>${message.type}</#if>"> | ||
<div class="pf-c-alert__icon"> | ||
<#if message.type = 'success'><span class="${properties.kcFeedbackSuccessIcon!}"></span></#if> | ||
<#if message.type = 'warning'><span class="${properties.kcFeedbackWarningIcon!}"></span></#if> | ||
<#if message.type = 'error'><span class="${properties.kcFeedbackErrorIcon!}"></span></#if> | ||
<#if message.type = 'info'><span class="${properties.kcFeedbackInfoIcon!}"></span></#if> | ||
</div> | ||
<span class="${properties.kcAlertTitleClass!}">${kcSanitize(message.summary)?no_esc}</span> | ||
</div> | ||
</#if> | ||
|
||
<#nested "form"> | ||
|
||
<#if auth?has_content && auth.showTryAnotherWayLink()> | ||
<form id="kc-select-try-another-way-form" action="${url.loginAction}" method="post"> | ||
<div class="${properties.kcFormGroupClass!}"> | ||
<input type="hidden" name="tryAnotherWay" value="on"/> | ||
<a href="#" id="try-another-way" | ||
onclick="document.forms['kc-select-try-another-way-form'].submit();return false;">${msg("doTryAnotherWay")}</a> | ||
</div> | ||
</form> | ||
</#if> | ||
|
||
<#nested "socialProviders"> | ||
|
||
<#if displayInfo> | ||
<div id="kc-info" class="${properties.kcSignUpClass!}"> | ||
<div id="kc-info-wrapper" class="${properties.kcInfoAreaWrapperClass!}"> | ||
<#nested "info"> | ||
</div> | ||
</div> | ||
</#if> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</body> | ||
</html> | ||
</#macro> |
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,11 @@ | ||
parent=base | ||
import=common/keycloak | ||
|
||
styles=css/login.css | ||
|
||
stylesCommon=web_modules/@patternfly/react-core/dist/styles/base.css web_modules/@patternfly/react-core/dist/styles/app.css node_modules/patternfly/dist/css/patternfly.min.css node_modules/patternfly/dist/css/patternfly-additions.min.css lib/pficon/pficon.css | ||
|
||
meta=viewport==width=device-width,initial-scale=1 | ||
|
||
kcHtmlClass=login-pf | ||
kcLoginClass=login-pf-page |
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,3 @@ | ||
#!/bin/bash | ||
|
||
jar cf booking-theme.jar -C custom-themes/ . |