Author: hansbak
Date: Thu Feb 5 10:20:39 2009 New Revision: 741062 URL: http://svn.apache.org/viewvc?rev=741062&view=rev Log: new registration in myportal now also creates a customer request why the registered person would like a userlogin 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/MyPortalForms.xml 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=741062&r1=741061&r2=741062&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml Thu Feb 5 10:20:39 2009 @@ -314,6 +314,10 @@ <simple-method method-name="createRegister" short-description="Create person when new register" login-required="false"> + <call-bsh><![CDATA[ + parameters.put("captchaCode",org.ofbiz.common.Captcha.ID_KEY); + org.ofbiz.common.Captcha.getCodeCaptcha(request,response); + ]]></call-bsh> <if-empty field="parameters.firstName"><property-to-field field="errorMessage" resource="MyPortalUiLabels" property="FirstName_Missing"/><field-to-list field="errorMessage" list="error_list"/></if-empty> <if-empty field="parameters.lastName"><property-to-field field="errorMessage" resource="MyPortalUiLabels" property="LastName_Missing"/><field-to-list field="errorMessage" list="error_list"/></if-empty> <if-empty field="parameters.USERNAME"><property-to-field field="errorMessage" resource="PartyUiLabels" property="PartyUserNameMissing"/><field-to-list field="errorMessage" list="error_list"/></if-empty> @@ -331,10 +335,6 @@ <!-- set parameter of userLogin to userLoginContext Map --> <set field="userLoginContext.userLoginId" from-field="parameters.USERNAME"/> - <call-bsh><![CDATA[ - parameters.put("captchaCode",org.ofbiz.common.Captcha.ID_KEY); - ]]></call-bsh> - <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"/> @@ -360,7 +360,7 @@ <field-to-list field="errorMessage" list="error_list"/> <check-errors error-list-name="error_list" error-code="resultPage"/> </else> - </if-empty> + </if-empty> <!-- create the PartyDataSource entry to track where this info came from... --> <make-value entity-name="PartyDataSource" value-field="partyDataSource"/> @@ -401,6 +401,13 @@ <set field="emailParams.emailType" from-field="storeEmail.emailType"/> <call-service service-name="sendMailFromScreen" in-map-name="emailParams"/> + <!-- Create Customer Request --> + <set field="custRequest.custRequestTypeId" value="RF_SUPPORT"/> + <set field="custRequest.fromPartyId" from-field="partyId"/> + <set field="custRequest.custRequestName" value="New user account"/> + <set field="custRequest.productStoreId" from-field="webSite.productStoreId"/> + <call-service service-name="createCustRequest" in-map-name="custRequest"/> + <!-- 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=741062&r1=741061&r2=741062&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml Thu Feb 5 10:20:39 2009 @@ -35,7 +35,7 @@ <request-map uri="createRegister"> <security https="true" auth="false"/> <event type="simple" invoke="createRegister" path="org/ofbiz/myportal/Events.xml"/> - <response name="resultPage" type="url" value="newRegisterLogin"/> + <response name="resultPage" type="view" value="newRegisterLogin"/> </request-map> <!-- TIMESHEET --> Modified: ofbiz/trunk/specialpurpose/myportal/widget/MyPortalForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/MyPortalForms.xml?rev=741062&r1=741061&r2=741062&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/widget/MyPortalForms.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/widget/MyPortalForms.xml Thu Feb 5 10:20:39 2009 @@ -310,8 +310,7 @@ <field name="firstName" title="${uiLabelMap.PartyFirstName}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="40" maxlength="60"/></field> <field name="middleName" title="${uiLabelMap.PartyMiddleName}" ><text size="40" maxlength="60"/></field> <field name="lastName" title="${uiLabelMap.PartyLastName}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="40" maxlength="60"/></field> - <field name="USER_EMAIL" title="${uiLabelMap.CommonEmail}" widget-style="required"><text size="60" maxlength="250"/></field> - <field name="comments" title="Why you would like a Log in?"><text size="60" maxlength="250"/></field> + <field name="USER_EMAIL" title="${uiLabelMap.CommonEmail}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="60" maxlength="250"/></field> <field name="UserLogin" title="${uiLabelMap.UserLogin}" title-area-style="group-label"><display description=" " also-hidden="false"/></field> <field name="USERNAME" title="${uiLabelMap.CommonUsername}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30" maxlength="250"/></field> <field name="PASSWORD" title="${uiLabelMap.CommonPassword}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><password size="15" maxlength="250"/></field> |
Free forum by Nabble | Edit this page |