Author: hansbak
Date: Thu May 21 08:16:16 2009 New Revision: 777004 URL: http://svn.apache.org/viewvc?rev=777004&view=rev Log: make the myportal 'new registration' working in the business theme Added: ofbiz/trunk/specialpurpose/myportal/widget/RegisterPerson.ftl (with props) ofbiz/trunk/specialpurpose/myportal/widget/reloadCaptchaCode.ftl (with props) ofbiz/trunk/specialpurpose/myportal/widget/reloadCaptchaImage.ftl (with props) Modified: ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/login.css Modified: ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml?rev=777004&r1=777003&r2=777004&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml Thu May 21 08:16:16 2009 @@ -109,7 +109,7 @@ <!-- set parameter of userLogin to userLoginContext Map --> <set field="userLoginContext.userLoginId" from-field="parameters.USERNAME"/> - + <now-timestamp field="nowStamp"/> <call-object-method obj-field="parameters.PASSWORD" method-name="toLowerCase" ret-field="parameters.PASSWORD"/> <call-object-method obj-field="parameters.CONFIRM_PASSWORD" method-name="toLowerCase" ret-field="parameters.CONFIRM_PASSWORD"/> @@ -172,20 +172,20 @@ <set field="emailParams.bodyScreenUri" from-field="storeEmail.bodyScreenLocation"/> <set field="emailParams.webSiteId" from-field="webSite.webSiteId"/> <set field="emailParams.emailType" from-field="storeEmail.emailType"/> - <call-service service-name="sendMailFromScreen" in-map-name="emailParams"/> - + <call-service service-name="sendMailFromScreen" in-map-name="emailParams"/> + <!-- Create Customer Request to show new registration--> <set field="custRequest.custRequestTypeId" value="RF_SUPPORT"/> <set field="custRequest.fromPartyId" from-field="partyId"/> <set field="custRequest.custRequestName" value="New user account created by registration"/> <set field="custRequest.productStoreId" from-field="webSite.productStoreId"/> + <set field="custRequest.statusId" value="CRQ_SUBMITTED"/> <call-service service-name="createCustRequest" in-map-name="custRequest"> <result-to-field result-name="custRequestId"/> </call-service> <set field="custRequestItem.custRequestId" from-field="custRequestId"/> <set field="custRequestItem.story" from-field="parameters.whyWouldYouLikeToRegister"/> - <call-service service-name="createCustRequestItem" in-map-name="custRequestItem"/> - + <call-service service-name="createCustRequestItem" in-map-name="custRequestItem"/> <!-- set field to request --> <field-to-request field="partyId" request-name="partyId"/> <field-to-request field="emailPurposeContext.contactMechId" request-name="contactMechId"/> Modified: ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml?rev=777004&r1=777003&r2=777004&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml Thu May 21 08:16:16 2009 @@ -46,9 +46,17 @@ <response name="error" type="view" value="newRegisterLogin"/> <response name="resultPage" type="view" value="newRegisterLogin"/> </request-map> - - + <request-map uri="reloadCaptchaImage"> + <security https="true" auth="false"/> + <response name="success" type="view" value="reloadCaptchaImage"/> + </request-map> + <request-map uri="reloadCaptchaCode"> + <security https="true" auth="false"/> + <response name="success" type="view" value="reloadCaptchaCode"/> + </request-map> <view-map name="main" type="screen" page="component://common/widget/PortalPageScreens.xml#showPortalPage"/> <view-map name="login" type="screen" page="component://myportal/widget/CommonScreens.xml#login"/> - <view-map name="newRegisterLogin" type="screen" page="component://myportal/widget/CommonScreens.xml#newRegisterLogin"/> + <view-map name="newRegisterLogin" type="screen" page="component://myportal/widget/CommonScreens.xml#newRegisterLogin"/> + <view-map name="reloadCaptchaImage" type="screen" page="component://myportal/widget/CommonScreens.xml#reloadCaptchaImage"/> + <view-map name="reloadCaptchaCode" type="screen" page="component://myportal/widget/CommonScreens.xml#reloadCaptchaCode"/> </site-conf> Modified: ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml?rev=777004&r1=777003&r2=777004&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml Thu May 21 08:16:16 2009 @@ -153,6 +153,9 @@ <!--New Register Person--> <screen name="newRegisterLogin"> <section> + <actions> + <set field="layoutSettings.javaScripts[]" value="/images/dojo/dojo.js" global="true"/> + </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> @@ -183,7 +186,10 @@ <set field="idKey" from-field="parameters.ID_KEY"/> </actions> <widgets> - <include-form name="RegisterPerson" location="component://myportal/widget/MyPortalForms.xml"/> + <!--<include-form name="RegisterPerson" location="component://myportal/widget/MyPortalForms.xml"/> --> + <platform-specific><html> + <html-template location="component://myportal/widget/RegisterPerson.ftl"/></html> + </platform-specific> </widgets> </section> </container> @@ -208,4 +214,25 @@ </section> </screen> + <screen name="reloadCaptchaImage"> + <section> + <actions> + <property-map resource="MyPortalUiLabels" map-name="uiLabelMap" global="true"/> + </actions> + <widgets> + <platform-specific><html><html-template location="component://myportal/widget/reloadCaptchaImage.ftl"/></html></platform-specific> + </widgets> + </section> + </screen> + + <screen name="reloadCaptchaCode"> + <section> + <actions> + <property-map resource="MyPortalUiLabels" map-name="uiLabelMap" global="true"/> + </actions> + <widgets> + <platform-specific><html><html-template location="component://myportal/widget/reloadCaptchaCode.ftl"/></html></platform-specific> + </widgets> + </section> + </screen> </screens> Added: ofbiz/trunk/specialpurpose/myportal/widget/RegisterPerson.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/RegisterPerson.ftl?rev=777004&view=auto ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/widget/RegisterPerson.ftl (added) +++ ofbiz/trunk/specialpurpose/myportal/widget/RegisterPerson.ftl Thu May 21 08:16:16 2009 @@ -0,0 +1,141 @@ + + <!-- 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="captchaCode"><input type="hidden" value="${parameters.ID_KEY}" name="captchaCode"/></div> + <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"/> + </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"/> + <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"/> + </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"/> + <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"/> + <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"/> + <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"/> + <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"/> + <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 id="captchaImage"><img src="${parameters.captchaFileName}"/></div> + </td> + </tr> + <script type="text/javascript" language="JavaScript"> + <!-- + dojo.require("dojo.widget.*"); + dojo.require("dojo.event.*"); + dojo.require("dojo.io.*"); + + function reloadCaptcha(){ + var submitToUri = "<@ofbizUrl>reloadCaptchaImage</@ofbizUrl>"; + dojo.io.bind({url: submitToUri, + load: function(type, data, evt){ + if(type == "load"){ + document.getElementById("captchaImage").innerHTML = data; + reloadCaptchaCode(); + } + },mimetype: "text/html"}); + } + function submitNewCustForm(){ + var nform = document.newuserform; + nform.captcha.value = document.captchaform.captcha.value; + nform.submit(); + } + function reloadCaptchaCode(){ + var submitToUri = "<@ofbizUrl>reloadCaptchaCode</@ofbizUrl>"; + dojo.io.bind({url: submitToUri, + load: function(type, data, evt){ + if(type == "load"){ + document.getElementById("captchaCode").innerHTML = data; + } + },mimetype: "text/html"}); + } + //--> + </script> + <tr> + <td class="label"> </td> + <td> + <a href="javascript:reloadCaptcha();">reload image</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/widget/RegisterPerson.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/specialpurpose/myportal/widget/RegisterPerson.ftl ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/specialpurpose/myportal/widget/RegisterPerson.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/specialpurpose/myportal/widget/reloadCaptchaCode.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/reloadCaptchaCode.ftl?rev=777004&view=auto ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/widget/reloadCaptchaCode.ftl (added) +++ ofbiz/trunk/specialpurpose/myportal/widget/reloadCaptchaCode.ftl Thu May 21 08:16:16 2009 @@ -0,0 +1,3 @@ +<#assign idkey = Static["org.ofbiz.common.Captcha"].ID_KEY> + +<input type="hidden" value="${idkey?if_exists}" name="captchaCode"/> \ No newline at end of file Propchange: ofbiz/trunk/specialpurpose/myportal/widget/reloadCaptchaCode.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/specialpurpose/myportal/widget/reloadCaptchaCode.ftl ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/specialpurpose/myportal/widget/reloadCaptchaCode.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/specialpurpose/myportal/widget/reloadCaptchaImage.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/reloadCaptchaImage.ftl?rev=777004&view=auto ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/widget/reloadCaptchaImage.ftl (added) +++ ofbiz/trunk/specialpurpose/myportal/widget/reloadCaptchaImage.ftl Thu May 21 08:16:16 2009 @@ -0,0 +1,5 @@ +<#-- For add Captcha Capture --> +<#assign fileName = Static["org.ofbiz.common.Captcha"].getCodeCaptcha(request,response)> +<#assign fileName = Static["org.ofbiz.common.Captcha"].CAPTCHA_FILE_NAME> + +<img src="<@ofbizContentUrl>/tempfiles/captcha/${fileName?if_exists}</@ofbizContentUrl>"/> Propchange: ofbiz/trunk/specialpurpose/myportal/widget/reloadCaptchaImage.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/specialpurpose/myportal/widget/reloadCaptchaImage.ftl ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/specialpurpose/myportal/widget/reloadCaptchaImage.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/login.css URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/login.css?rev=777004&r1=777003&r2=777004&view=diff ============================================================================== --- ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/login.css (original) +++ ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/login.css Thu May 21 08:16:16 2009 @@ -85,10 +85,10 @@ background:#E7EFF5; text-decoration: none; color:#699BC9; - height:22px; + height:18px; display:block; line-height:10px; - padding:15px 0 0 10px; + padding:5px 0 0px 0; font-size:11px; } a:hover { @@ -102,7 +102,10 @@ ***********************************************/ table {border-collapse: collapse; border-spacing: 0; margin: 0; width:100%} caption {text-align: left;} -th, td {padding: .25em .5em;} +th, td {padding: .10em .5em;} +td #RegisterPerson_salutation,#RegisterPerson_middleName { + margin-right:12%; +} tbody td, tbody th {} tfoot {font-style: italic;} @@ -137,11 +140,18 @@ input[type="text"],input[type="password"] { border: #ddd solid 2px; font-size: 1.1em; - margin:5px 5px 5px 5px; padding:2px 4px; width:250px; } +input[type="password"] { + border: #ddd solid 2px; + font-size: 1.1em; + padding:2px 4px; + width:250px; + +} + input[type="submit"],input[type="button"],input[type="reset"] { background-color: #ffffff; border: #ddd solid 2px; @@ -161,12 +171,13 @@ .label { font-weight:bold; - margin:0 4px 0 0; + margin:0 0 0 0; text-align:right; white-space:nowrap; - width:1%; + width:40%; } + input:focus,textarea:focus { border: 2px solid #6E2723; } input.focused, textarea.focused { border: 2px solid #6E2723; } @@ -179,12 +190,11 @@ body { text-align:center; - overflow:hidden; + } #wrap { margin: 0; - } #header { @@ -195,21 +205,13 @@ display:none; } -.contentarea { - margin-left: -200px; - position: absolute; - top: 15%; - left: 50%; - width: 400px; - height: 300px; - overflow: visible; -} + #column-container { - width:400px; + width:700px; margin:0 auto; - padding:100px 0 0 0; - background:url(../images/login-logo.gif) center 20px no-repeat; + padding:70px 0 0 0; + background:url(../images/login-logo.gif) center 5px no-repeat; } #content-main-section { @@ -226,7 +228,8 @@ } .screenlet-body { - padding:10px; + text-align:center; + padding:2px; } #footer { @@ -336,7 +339,7 @@ border: solid 5px #ddd; padding: 5px; } -span#modal-close-btn{ +span #modal-close-btn{ color: red; position: absolute; right: 10px; @@ -360,4 +363,4 @@ border: 0.2em solid #ff0000; color: #ff0000; font-weight: bold; -} \ No newline at end of file +} |
Free forum by Nabble | Edit this page |