You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by nm...@apache.org on 2021/09/09 16:34:46 UTC

[ofbiz-framework] branch trunk updated: Improved: Improve login page for Helveticus Theme (OFBIZ-12313)

This is an automated email from the ASF dual-hosted git repository.

nmalin pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 4bb54a1  Improved: Improve login page for Helveticus Theme (OFBIZ-12313)
4bb54a1 is described below

commit 4bb54a1d1cbe1ac78148cb9211fb992f05f66ce1
Author: Nicolas Malin <ni...@nereide.fr>
AuthorDate: Thu Sep 9 18:33:50 2021 +0200

    Improved: Improve login page for Helveticus Theme (OFBIZ-12313)
    
    Update the login page for Helveticus theme to keep the same spirit.
    
    Thanks to Marine Desmarchelier for her work
---
 framework/common/config/CommonUiLabels.xml         |  4 +
 framework/webtools/template/Main.ftl               |  2 +-
 themes/helveticus/template/ForgotPassword.ftl      | 77 +++++++++----------
 themes/helveticus/template/Login.ftl               | 62 ++++++++-------
 .../webapp/helveticus/helveticus-main-theme.less   | 89 ++++++++++++++++++++++
 5 files changed, 161 insertions(+), 73 deletions(-)

diff --git a/framework/common/config/CommonUiLabels.xml b/framework/common/config/CommonUiLabels.xml
index 9744549..50b5d78 100644
--- a/framework/common/config/CommonUiLabels.xml
+++ b/framework/common/config/CommonUiLabels.xml
@@ -9852,6 +9852,10 @@
         <value xml:lang="zh-CN">接收到的</value>
         <value xml:lang="zh-TW">已接收</value>
     </property>
+    <property key="CommonReceivePasswordEmail">
+        <value xml:lang="en">To receive your password, enter your user name.</value>
+        <value xml:lang="fr">Pour recevoir votre mot de passe par email, renseignez votre nom d'utilisateur.</value>
+    </property>
     <property key="CommonRed">
         <value xml:lang="ar">أحمر</value>
         <value xml:lang="cs">Červený</value>
diff --git a/framework/webtools/template/Main.ftl b/framework/webtools/template/Main.ftl
index e1ac9a4..4df797b 100644
--- a/framework/webtools/template/Main.ftl
+++ b/framework/webtools/template/Main.ftl
@@ -30,7 +30,7 @@ under the License.
       <br />
       <div>${uiLabelMap.WebtoolsNoteAntRunInstall}</div>
       <br />
-      <div><a href="<@o...@ofbizUrl>">${uiLabelMap.CommonLogin}</a></div>
+      <div><a class="buttontext" href="<@o...@ofbizUrl>">${uiLabelMap.CommonLogin}</a></div>
     </#if>
     <#if userLogin?has_content>
       <ul class="webToolList">
diff --git a/themes/helveticus/template/ForgotPassword.ftl b/themes/helveticus/template/ForgotPassword.ftl
index ef98e39..367eed6 100644
--- a/themes/helveticus/template/ForgotPassword.ftl
+++ b/themes/helveticus/template/ForgotPassword.ftl
@@ -24,50 +24,47 @@ under the License.
         <#assign userLoginId = autoUserLogin.userLoginId>
     </#if>
 </#if>
-<div id="loginBar"><span>${messageTitle}</span><div id="company-logo"></div></div>
-<center>
+    <div id="loginBar">
+        <div id="company-logo"></div>
+    </div>
+
     <div class="screenlet login-screenlet">
-        <div class="screenlet-title-bar">
-            <h3>${messageTitle}</h3>
-        </div>
+        <h3>${messageTitle}</h3>
         <div class="screenlet-body">
+            <p>${uiLabelMap.CommonReceivePasswordEmail}
             <form method="post" action="<@o...@ofbizUrl>" name="forgotpassword">
-                <table class="basic-table" cellspacing="0">
-                    <tr>
-                        <td class="label">${uiLabelMap.CommonUsername}</td>
-                        <td><input type="text" size="20" name="USERNAME" value="${userLoginId!}"/></td>
-                    </tr>
-                  <#if requestParameters.token??>
-                      <input type="hidden" name="token" value="${requestParameters.token}"/>
-                      <tr>
-                          <td class="label">${uiLabelMap.CommonNewPassword}</td>
-                          <td><input type="password" name="newPassword" autocomplete="off" value="" size="20"/></td>
-                      </tr>
-                      <tr>
-                          <td class="label">${uiLabelMap.CommonNewPasswordVerify}</td>
-                          <td><input type="password" name="newPasswordVerify" autocomplete="off" value="" size="20"/></td>
-                      </tr>
-                      <tr>
-                          <td colspan="2" align="center">
-                              <input type="submit" class="smallSubmit" value="${uiLabelMap.CommonContinue}"/>
-                          </td>
-                      </tr>
-                  <#else>
-                    <tr>
-                        <td colspan="2" align="center">
-                            <input type="submit" name="GET_PASSWORD_HINT" class="smallSubmit" value="${uiLabelMap.CommonGetPasswordHint}" />&nbsp;
-                            <input type="submit" name="EMAIL_PASSWORD" class="smallSubmit" value="${uiLabelMap.CommonEmailPassword}" />
-                        </td>
-                    </tr>
-                    <tr>
-                        <td colspan="2" align="center">
-                            <a href='#' class="buttontext" onclick="window.history.back();">${uiLabelMap.CommonGoBack}</a>
-                        </td>
-                    </tr>
-                  </#if>
-                </table>
+                <label>
+                    ${uiLabelMap.CommonUsername}
+                    <input type="text" name="USERNAME" value="${userLoginId!}"/>
+                </label>
+        
+                <#if requestParameters.token??>
+                    <input type="hidden" name="token" value="${requestParameters.token}"/>
+                <label>
+                    ${uiLabelMap.CommonNewPassword}
+                    <input type="password" name="newPassword" autocomplete="off" value=""/>
+                </label>
+
+                <label>
+                    ${uiLabelMap.CommonNewPassword}
+                    <input type="password" name="newPassword" autocomplete="off" value=""/>
+                </label>
+
+                <label>
+                    ${uiLabelMap.CommonNewPasswordVerify}
+                    <input type="password" name="newPasswordVerify" autocomplete="off" value=""/>
+                </label>
+
+                <input type="submit" class="smallSubmit" value="${uiLabelMap.CommonContinue}"/>
+
+                <#else>
+                <div class="button-group">
+                    <a href='#' class="buttontext" onclick="window.history.back();">${uiLabelMap.CommonGoBack}</a>
+                    <input type="submit" name="EMAIL_PASSWORD" class="smallSubmit" value="${uiLabelMap.CommonSend}" />
+                </div>                
+                <input type="submit" name="GET_PASSWORD_HINT" value="${uiLabelMap.CommonGetPasswordHint}" class="link" />
+                </#if>
                 <input type="hidden" name="JavaScriptEnabled" value="N" />
             </form>
         </div>
     </div>
-</center>
\ No newline at end of file
diff --git a/themes/helveticus/template/Login.ftl b/themes/helveticus/template/Login.ftl
index 527b79d..667d8cb 100644
--- a/themes/helveticus/template/Login.ftl
+++ b/themes/helveticus/template/Login.ftl
@@ -26,46 +26,44 @@ under the License.
 <#else>
   <#assign focusName = true>
 </#if>
-<div id="loginBar"><span>${uiLabelMap.CommonBeLogged}</span><div id="company-logo"></div></div>
-<center>
+  <div id="loginBar">
+    <div id="company-logo"></div>
+  </div>
+
   <div class="screenlet login-screenlet">
-    <div class="screenlet-title-bar">
-      <h3>${uiLabelMap.CommonRegistered}</h3>
-    </div>
+    <h3>${uiLabelMap.CommonBeLogged}</h3>
     <div class="screenlet-body">
       <form method="post" action="<@o...@ofbizUrl>" name="loginform">
-        <table class="basic-table" cellspacing="0">
-          <tr>
-            <td class="label">${uiLabelMap.CommonUsername}</td>
-            <td><input type="text" name="USERNAME" value="${username}" size="20"/></td>
-          </tr>
-          <tr>
-            <td class="label">${uiLabelMap.CommonPassword}</td>
-            <td><input type="password" name="PASSWORD" autocomplete="off" value="" size="20"/></td>
-          </tr>
-          <#if ("Y" == useMultitenant) >
-              <#if !requestAttributes.userTenantId??>
-                  <tr>
-                      <td class="label">${uiLabelMap.CommonTenantId}</td>
-                      <td><input type="text" name="userTenantId" value="${parameters.userTenantId!}" size="20"/></td>
-                  </tr>
-              <#else>
-                  <input type="hidden" name="userTenantId" value="${requestAttributes.userTenantId!}"/>
-              </#if>
+        <label>
+          ${uiLabelMap.CommonUsername}
+          <input type="text" name="USERNAME" value="${username}"/>
+        </label>
+        
+        <label>
+          <span>
+            ${uiLabelMap.CommonPassword}
+            <a href="<@o...@ofbizUrl>">${uiLabelMap.CommonForgotYourPassword}</a>
+          </span>
+          <input type="password" name="PASSWORD" autocomplete="off" value=""/>
+        </label>
+
+        <#if ("Y" == useMultitenant) >
+          <#if !requestAttributes.userTenantId??>
+          <label>
+            ${uiLabelMap.CommonTenantId}
+            <input type="text" name="userTenantId" value="${parameters.userTenantId!}"/>
+          </label>
+          <#else>
+          <input type="hidden" name="userTenantId" value="${requestAttributes.userTenantId!}"/>
           </#if>
-          <tr>
-            <td colspan="2" align="center">
-              <input type="submit" value="${uiLabelMap.CommonLogin}"/>
-            </td>
-          </tr>
-        </table>
+        </#if>
+
+        <input type="submit" value="${uiLabelMap.CommonLogin}"/>
         <input type="hidden" name="JavaScriptEnabled" value="N"/>
-        <br />
-        <a href="<@o...@ofbizUrl>">${uiLabelMap.CommonForgotYourPassword}?</a>
+        
       </form>
     </div>
   </div>
-</center>
 
 <script type="application/javascript">
   document.loginform.JavaScriptEnabled.value = "Y";
diff --git a/themes/helveticus/webapp/helveticus/helveticus-main-theme.less b/themes/helveticus/webapp/helveticus/helveticus-main-theme.less
index 7de0f55..e4c316e 100644
--- a/themes/helveticus/webapp/helveticus/helveticus-main-theme.less
+++ b/themes/helveticus/webapp/helveticus/helveticus-main-theme.less
@@ -1300,6 +1300,95 @@ form .basic-table,
   border-color: @border-color !important
 }
 
+#loginBar {
+  width: 30%;
+  margin:0 auto;
+  #company-logo {
+    background: url("images/ofbiz_logo.svg") no-repeat center center / auto 100%;
+    height: 12rem;
+    width: 100%;
+    margin:0.7rem 0 1.2rem 0;
+  }
+}
+
+.login-screenlet{
+  padding:5rem;
+  width: 400px;
+  margin:0 auto;
+  box-shadow: 0 0 15px 15px @shadow-color !important;
+  background-color: white;
+  h3{
+    text-align: center;
+    font-size:2.2rem;
+    font-weight: 600;
+  }
+  p{
+    text-align:center;
+    font-size: 1.5rem;
+    color:@grey;
+    font-weight: 500;
+  }
+  form[name="loginform"], form[name="forgotpassword"]{
+    margin-top:3.5rem;
+    display: flex;
+    flex-direction: column;
+    gap:4rem;
+    label{
+      font-size: 1.5rem;
+      font-weight: 600;
+      display: flex;
+      flex-direction: column; 
+      gap:1rem;
+      span{
+        display:flex;
+        justify-content: space-between;
+        align-items: end;
+        a{
+          text-align:right;
+          font-size:1rem;
+        }
+      }
+    }
+    input[type="text"], input[type="password"]{
+      border:none;
+      background-color:@grey-light;
+      padding:1rem;
+      font-size:1.2rem;
+      opacity: 0.5;
+      outline: none !important;
+      &:focus{
+        opacity: 0.75;
+        border:none;        
+      }
+    }
+    input[type="submit"]{
+      font-size:1.5rem;
+      font-family: 'Quicksand', sans-serif;
+      font-weight: 800;
+      padding:1rem;
+    }
+    .button-group{
+      display:flex;
+      justify-content: center;
+      gap:1rem;
+      .buttontext{
+        font-size: 1.5rem;
+        font-family: 'Quicksand', sans-serif;
+        font-weight: 800;
+        padding: 1rem;
+        margin:0;
+      }
+    }
+    .link{
+      background: transparent;
+      padding:0;
+      color:@main-color-theme;
+      &:hover{
+        text-decoration: underline;
+      }
+    }
+  }
+}
 .ui-dialog{
   left: ~"calc(50% - 320px)" !important;
   top: 2rem !important;