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 2012/04/12 08:46:34 UTC
svn commit: r1325136 - in /ofbiz/trunk/applications/marketing/widget/sfa:
AccountScreens.xml forms/AccountForms.xml
Author: jleroux
Date: Thu Apr 12 06:46:34 2012
New Revision: 1325136
URL: http://svn.apache.org/viewvc?rev=1325136&view=rev
Log:
A patch from Tom Burns for "Add Support for Dependent Country State Drop Downs to SFA New Postal Address " https://issues.apache.org/jira/browse/OFBIZ-4801
Description
In SFA "Create New Account" does not implement dependent drop downs for Country/State.
This is not consistent whith the behavior in the Account update form which uses Country/State dependent drop downs.
To Reproduce:
In SFA select Accounts
Select "Create New Account"
Expect: "State" values to be limited to values valid for the selected country.
Actual: "State" values include all values in stateProvinceGeoId regardless of the selected Country.
After Improvement:
State values will be filtered based on the value selected in "Country Geo Id"
Modified:
ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml
ofbiz/trunk/applications/marketing/widget/sfa/forms/AccountForms.xml
Modified: ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml?rev=1325136&r1=1325135&r2=1325136&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/AccountScreens.xml Thu Apr 12 06:46:34 2012
@@ -82,12 +82,27 @@ under the License.
<set field="titleProperty" value="PageTitleCreateAccount"/>
<set field="accountType" from-field="parameters.accountType"/>
<property-to-field field="defaultCountryGeoId" resource="general" property="country.geo.id.default" default="USA"/>
+
+ <set field="dependentForm" value="NewAccount"/>
+ <set field="paramKey" value="countryGeoId"/>
+ <set field="mainId" value="countryGeoId"/>
+ <set field="dependentId" value="stateProvinceGeoId"/>
+ <set field="requestName" value="getAssociatedStateList"/>
+ <set field="responseName" value="stateList"/>
+ <set field="dependentKeyName" value="geoId"/>
+ <set field="descName" value="geoName"/>
+ <set field="selectedDependentOption" from-field="selectedStateName" default-value="_none_"/>
</actions>
<widgets>
<decorator-screen name="CommonAccountDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<container style="no-clear">
<screenlet title="${uiLabelMap.PageTitleCreateAccount}">
+ <platform-specific>
+ <html>
+ <html-template location="component://common/webcommon/includes/setDependentDropdownValuesJs.ftl"/>
+ </html>
+ </platform-specific>
<include-form name="NewAccount" location="component://marketing/widget/sfa/forms/AccountForms.xml"/>
</screenlet>
</container>
Modified: ofbiz/trunk/applications/marketing/widget/sfa/forms/AccountForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/forms/AccountForms.xml?rev=1325136&r1=1325135&r2=1325136&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/forms/AccountForms.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/forms/AccountForms.xml Thu Apr 12 06:46:34 2012
@@ -49,14 +49,20 @@ under the License.
<field name="postalCode" title="${uiLabelMap.CommonZipPostalCode}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
<text size="10" maxlength="30"/>
</field>
- <field name="countryGeoId" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
- <drop-down allow-empty="false" no-current-selected-key="${defaultCountryGeoId}">
+ <field name="stateProvinceGeoId" title="${uiLabelMap.CommonState}" widget-style="required"><drop-down allow-empty="false"/></field>
+
+ <field name="stateProvinceGeoId" title="${uiLabelMap.CommonState}" widget-style="required"><drop-down allow-empty="false"/></field>
+
+ <field name="countryGeoId" title="${uiLabelMap.CommonCountry}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
+ <drop-down no-current-selected-key="${defaultCountryGeoId}">
<entity-options entity-name="Geo" key-field-name="geoId" description="${geoName} - ${geoId}">
<entity-constraint name="geoTypeId" value="COUNTRY"/>
<entity-order-by field-name="geoName"/>
</entity-options>
</drop-down>
</field>
+
+
<field name="phoneTitle" title="${uiLabelMap.PartyPrimaryPhone}" title-area-style="group-label"><display/></field>
<field name="countryCode" title="${uiLabelMap.PartyCountryCode}"><text size="4" maxlength="10"/></field>
<field name="areaCode" title="${uiLabelMap.PartyAreaCode}"><text size="4" maxlength="10"/></field>