You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2016/03/28 13:16:52 UTC

svn commit: r1736870 - in /ofbiz/trunk/specialpurpose/myportal: template/ template/RegisterPerson.ftl template/login.ftl widget/CommonScreens.xml

Author: jleroux
Date: Mon Mar 28 11:16:52 2016
New Revision: 1736870

URL: http://svn.apache.org/viewvc?rev=1736870&view=rev
Log:
A patch from Pierre Smits for <<relocate .ftl files in the myportal component>> https://issues.apache.org/jira/browse/OFBIZ-6860

Added:
    ofbiz/trunk/specialpurpose/myportal/template/
    ofbiz/trunk/specialpurpose/myportal/template/RegisterPerson.ftl   (with props)
    ofbiz/trunk/specialpurpose/myportal/template/login.ftl   (with props)
Modified:
    ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml

Added: ofbiz/trunk/specialpurpose/myportal/template/RegisterPerson.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/template/RegisterPerson.ftl?rev=1736870&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/template/RegisterPerson.ftl (added)
+++ ofbiz/trunk/specialpurpose/myportal/template/RegisterPerson.ftl Mon Mar 28 11:16:52 2016
@@ -0,0 +1,135 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+
+    <!-- Begin  Form Widget - Form Element  component://myportal/widget/MyPortalForms.xml#RegisterPerson -->
+    <form name="RegisterPerson" onsubmit="javascript:submitFormDisableSubmits(this)" class="basic-form" id="RegisterPerson" action="/myportal/control/createRegister" method="post">
+        <input type="hidden" value="${webSiteId!}" name="webSiteId"/>
+        <input type="hidden" name="reload"/>
+        <div id="_G0_" class="fieldgroup"><div class="fieldgroup-title-bar"><table><tbody><tr><td class="collapse"> </td><td> </td></tr></tbody></table></div><div class="fieldgroup-body" id="_G0__body">
+            <table cellspacing="0" class="basic-table">
+                <tbody>
+                    <tr>
+                        <td class="label">    Why Would You Like To Register    
+                        </td>
+                        <td><textarea id="RegisterPerson_whyWouldYouLikeToRegister" rows="5" cols="60" class="required false" name="whyWouldYouLikeToRegister"></textarea>
+                            <span class="tooltip">Required</span>    
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="label">    Salutation    </td>
+                        <td class="no-required">
+                            <input type="text" autocomplete="off" id="RegisterPerson_salutation" maxlength="60" size="40" name="salutation" value="${requestParameters.salutation!}"/>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="label">    First name    </td>
+                        <td>
+                            <input type="text" autocomplete="off" id="RegisterPerson_firstName" maxlength="60" size="40" class="required false" name="firstName" value="${requestParameters.firstName!}"/>
+                            <span class="tooltip">Required</span>    
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="label">        Middle Name    </td>
+                        <td class="no-required">
+                            <input type="text" autocomplete="off" id="RegisterPerson_middleName" maxlength="60" size="40" name="middleName" value="${requestParameters.middleName!}"/>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="label">        Last name    </td>
+                        <td>
+                            <input type="text" autocomplete="off" id="RegisterPerson_lastName" maxlength="60" size="40" class="required false" name="lastName" value="${requestParameters.lastName!}"/>
+                            <span class="tooltip">Required</span>    
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="label">    Email    </td>
+                        <td>
+                            <input type="text" autocomplete="off" id="RegisterPerson_USER_EMAIL" maxlength="250" size="60" class="required false" name="USER_EMAIL" value="${requestParameters.USER_EMAIL!}"/>
+                            <span class="tooltip">Required</span>    
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="group-label">    User Login    </td>
+                        <td> </td>
+                    </tr>
+                    <tr>
+                        <td class="label">    Username    </td>
+                        <td>
+                            <input type="text" autocomplete="off" id="RegisterPerson_USERNAME" maxlength="250" size="30" class="required false" name="USERNAME" value="${requestParameters.USERNAME!}"/>
+                            <span class="tooltip">Required</span>    
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="label">    Password    </td>
+                        <td>
+                            <input type="password" id="RegisterPerson_PASSWORD" maxlength="250" size="15" name="PASSWORD" class="required false" value="${requestParameters.PASSWORD!}"/>
+                            <span class="tooltip">Required</span>    
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="label">    Password    </td>
+                        <td>
+                            <input type="password" id="RegisterPerson_CONFIRM_PASSWORD" maxlength="250" size="15" name="CONFIRM_PASSWORD" class="required false" value="${requestParameters.CONFIRM_PASSWORD!}"/>
+                            <span class="tooltip">* Confirm</span>    
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="group-label">    Verify captcha code    </td>
+                        <td> </td>
+                    </tr>
+                    <tr>
+                        <td class="label"> Code Captcha </td>
+                        <td><div><img id="captchaImage" src="<@o...@ofbizUrl>" alt="" /></div></td>
+                    </tr>
+                    <script type="text/javascript" language="JavaScript">
+                    <!--
+                        function reloadCaptcha(fieldName) {
+                            var captchaUri = "<@ofbizUrl>captcha.jpg?captchaCodeId=" + fieldName + "&amp;unique=_PLACEHOLDER_</...@ofbizUrl>";
+                            var unique = Date.now();
+                            captchaUri = captchaUri.replace("_PLACEHOLDER_", unique);
+                            document.getElementById(fieldName).src = captchaUri;
+                        }
+                    //-->
+                    </script>
+                    <tr>
+                        <td class="label"> </td>
+                        <td>
+                            <a href="javascript:reloadCaptcha('captchaImage');">${uiLabelMap.CommonReloadCaptchaCode}</a>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="label">    Verify captcha code    </td>
+                        <td>
+                            <input type="text" autocomplete="off" id="RegisterPerson_captcha" maxlength="30" size="23" class="required false" name="captcha"/>
+                            <span class="tooltip">Required</span>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td class="group-label"> </td>
+                        <td>
+                            <input type="submit" value="Save" name="submitButton"/>
+                        </td>
+                    </tr>
+                </tbody>
+             </table>
+        </div>
+    <!-- End  Form Widget - Form Element  component://myportal/widget/MyPortalForms.xml#RegisterPerson --><!-- End Section Widget  -->
+    </form>
+

Propchange: ofbiz/trunk/specialpurpose/myportal/template/RegisterPerson.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/myportal/template/RegisterPerson.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/specialpurpose/myportal/template/RegisterPerson.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/specialpurpose/myportal/template/login.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/template/login.ftl?rev=1736870&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/template/login.ftl (added)
+++ ofbiz/trunk/specialpurpose/myportal/template/login.ftl Mon Mar 28 11:16:52 2016
@@ -0,0 +1,77 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#if requestAttributes.uiLabelMap??><#assign uiLabelMap = requestAttributes.uiLabelMap></#if>
+<#assign useMultitenant = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties", "multitenant")>
+
+<#assign username = requestParameters.USERNAME?default((sessionAttributes.autoUserLogin.userLoginId)?default(""))>
+<#if username != "">
+  <#assign focusName = false>
+<#else>
+  <#assign focusName = true>
+</#if>
+<center>
+  <div class="screenlet login-screenlet">
+    <div class="screenlet-title-bar">
+      <h3>${uiLabelMap.CommonRegistered}</h3>
+    </div>
+    <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" 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>
+          </#if>
+          <tr>
+            <td colspan="2" align="center">
+              <input type="submit" value="${uiLabelMap.CommonLogin}"/>
+            </td>
+          </tr>
+        </table>
+        <input type="hidden" name="JavaScriptEnabled" value="N"/>
+        <br />
+        <a href="<@o...@ofbizUrl>">${uiLabelMap.CommonForgotYourPassword}?</a>
+        <a href="<@o...@ofbizUrl>">${uiLabelMap.MyPortalNewRegistration}</a>
+      </form>
+    </div>
+  </div>
+</center>
+
+<script language="JavaScript" type="text/javascript">
+  document.loginform.JavaScriptEnabled.value = "Y";
+  <#if focusName>
+    document.loginform.USERNAME.focus();
+  <#else>
+    document.loginform.PASSWORD.focus();
+  </#if>
+</script>

Propchange: ofbiz/trunk/specialpurpose/myportal/template/login.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/myportal/template/login.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/specialpurpose/myportal/template/login.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml?rev=1736870&r1=1736869&r2=1736870&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml Mon Mar 28 11:16:52 2016
@@ -158,7 +158,7 @@ under the License.
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
-                            <html><html-template location="component://myportal/widget/login.ftl"/></html>
+                            <html><html-template location="component://myportal/template/login.ftl"/></html>
                         </platform-specific>
                     </decorator-section>
                 </decorator-screen>
@@ -190,7 +190,7 @@ under the License.
                                     <section>
                                         <widgets>
                                             <platform-specific>
-                                                <html><html-template location="component://myportal/widget/RegisterPerson.ftl"/></html>
+                                                <html><html-template location="component://myportal/template/RegisterPerson.ftl"/></html>
                                             </platform-specific> 
                                         </widgets>
                                     </section>