Skip to content

Commit

Permalink
Issue Sunbird-Lern#24 chore:Sunbird auth package build
Browse files Browse the repository at this point in the history
  • Loading branch information
ahghatol committed Dec 26, 2017
1 parent be6fd62 commit 8f7929e
Show file tree
Hide file tree
Showing 11 changed files with 1,173 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<#import "template.ftl" as layout>
<@layout.registrationLayout displayInfo=true; section>
<#if section = "title">
${msg("emailForgotTitle")}
<#elseif section = "header">
${msg("emailForgotTitle")}
<#elseif section = "form">
<div class="page-login">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<div class="ui centered grid container">
<div class="ten wide column signInGridAlign">
<div class="ui fluid card">
<div class="ui centered medium image signInLogo margin-top3em">
<img src="${url.resourcesPath}/img/logo.png">
</div>
<div class="ui basic segment">
<h2 class="ui header">${msg("emailForgotTitle")}</h2>
</div>
<div class="content signin-contentPadding">
<form id="kc-reset-password-form" class="ui form pre-signin" action="${url.loginAction}" method="post">
<div class="field">
<label for="username"><#if !realm.loginWithEmailAllowed>${msg("username")}<#elseif !realm.registrationEmailAsUsername>${msg("usernameOrEmail")}<#else>${msg("email")}</#if></label>
<input type="text" id="username" name="username" placeholder="${msg("emailInstruction")}" autofocus/>
</div>

<div class="ui grid margin-top2em">
<div class="six wide column">
<div id="kc-form-options">
<div class="${properties.kcFormOptionsWrapperClass!}">
<span><a href="${url.loginUrl}">${msg("backToLogin")}</a></span>
</div>
</div>
</div>
<div class="six wide column">
<div id="kc-form-buttons">
<button class="ui primary right floated button buttonResizeClass" type="submit">${msg("doSubmit")}</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<#elseif section = "info" >
</#if>
</@layout.registrationLayout>

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<#import "template.ftl" as layout>
<@layout.registrationLayout displayInfo=true; section>
<#if section = "title">
${msg("updatePasswordTitle")}
<#elseif section = "header">
${msg("updatePasswordTitle")}
<#elseif section = "form">
<div class="page-login">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<div class="ui centered grid container">
<div class="ten wide column signInGridAlign">
<div class="ui fluid card">
<div class="ui centered medium image signInLogo margin-top3em">
<img src="${url.resourcesPath}/img/logo.png">
</div>
<div class="ui basic segment">
<h2 class="ui header">${msg("updatePasswordTitle")}</h2>
</div>
<div class="content signin-contentPadding">
<form id="kc-passwd-update-form" class="ui form pre-signin" action="${url.loginAction}" method="post">
<input type="text" readonly value="this is not a login form" style="display: none;">
<input type="password" readonly value="this is not a login form" style="display: none;">

<div class="field">
<label for="password-new">${msg("passwordNew")}</label>
<input type="password" id="password-new" name="password-new" autofocus autocomplete="off" />
</div>

<div class="field">
<label for="password-confirm" >${msg("passwordConfirm")}</label>
<input type="password" id="password-confirm" name="password-confirm" autocomplete="off" />
</div>

<div class="ui grid margin-top2em">
<div id="kc-form-options" class="${properties.kcFormOptionsClass!}">
<div class="${properties.kcFormOptionsWrapperClass!}">
</div>
</div>

<div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
<button class="ui primary right floated button buttonResizeClass" type="submit">${msg("doSubmit")}</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</#if>
</@layout.registrationLayout>
72 changes: 72 additions & 0 deletions keycloak/scripts/ansible/artifacts/sunbird/login.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<#import "template.ftl" as layout>
<@layout.registrationLayout displayInfo=social.displayInfo; section>
<#if section = "title">
${msg("loginTitle",(realm.displayName!''))}
<#elseif section = "header">
${msg("loginTitleHtml",(realm.displayNameHtml!''))}
<#elseif section = "form">
<#if realm.password>
<div class="page-login">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<div class="ui centered grid container">
<div class="ten wide column signInGridAlign">
<div class="ui fluid card">
<div class="ui centered medium image signInLogo margin-top3em">
<img src="${url.resourcesPath}/img/logo.png">
</div>
<div class="ui basic segment">
<h2 class="ui header">${msg("loginTitle",(realm.displayName!''))}</h2>
</div>
<div class="content signin-contentPadding">
<form id="kc-form-login" class="ui form pre-signin" method="POST" action="${url.loginAction}">
<div class="field">
<label for="username"><#if !realm.loginWithEmailAllowed>${msg("username")}<#elseif !realm.registrationEmailAsUsername>${msg("usernameOrEmail")}<#else>${msg("email")}</#if></label>
<#if usernameEditDisabled??>
<input id="username" name="username" value="${(login.username!'')?html}" type="text" disabled />
<#else>
<input id="username" name="username" value="${(login.username!'')?html}" type="text" autofocus autocomplete="off" />
</#if>
</div>
<div class="field">
<label for="password">${msg("password")}</label>
<input id="password" name="password" type="password" autocomplete="off" />
</div>
<div class="ui grid margin-top2em">
<div class="six wide column">
<div class="forgot-passwordText">
<#if realm.resetPasswordAllowed>
<span><a href="${url.loginResetCredentialsUrl}">${msg("doForgotPassword")}</a></span>
</#if>
</div>
</div>
<div class="six wide column">
<button class="ui primary right floated button buttonResizeClass" name="login" id="kc-login" type="submit">${msg("doLogIn")}</button>
</div>
</div>
</form>
</div>
<div>
</div>
</div>
</div>
</div>
</div>
</#if>
<#elseif section = "info" >
<#if realm.password && realm.registrationAllowed && !usernameEditDisabled??>
<div id="kc-registration">
<span>${msg("noAccount")} <a href="${url.registrationUrl}">${msg("doRegister")}</a></span>
</div>
</#if>

<#if realm.password && social.providers??>
<div id="kc-social-providers">
<ul>
<#list social.providers as p>
<li><a href="${p.loginUrl}" id="zocial-${p.alias}" class="zocial ${p.providerId}"> <span class="text">${p.displayName}</span></a></li>
</#list>
</ul>
</div>
</#if>
</#if>
</@layout.registrationLayout>
Loading

0 comments on commit 8f7929e

Please sign in to comment.