Skip to content
Permalink
Browse files

Improved: Find order screen can't make a search without ship to country

(OFBIZ-11176)
When you search orders on the standard screen [1] you can't unselect a country.
The problem come from the populate country list by countries.ftl who select by default a country without possibility to escape it.
We added a possibility to escape it through variable doNotPreselectDefaultCountryGeoId 

[1] https://localhost:8443/ordermgr/control/findorders

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866012 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
nmalin committed Aug 27, 2019
1 parent 18e29ba commit cbc0a765175215234530643471f12a9142db8815
@@ -114,6 +114,9 @@ if (currentGoodIdentificationTypeId) {
context.currentGoodIdentificationType = currentGoodIdentificationType
}

//for countries drop down, set the list on empty value by default
context.doNotPreselectDefaultCountryGeoId = 'Y'

// create the fromDate for calendar
fromCal = Calendar.getInstance()
fromCal.setTime(new java.util.Date())
@@ -414,10 +414,10 @@ function toggleOrderIdList() {
<#if requestParameters.countryGeoId?has_content>
<#assign countryGeoId = requestParameters.countryGeoId>
<#assign geo = delegator.findOne("Geo", Static["org.apache.ofbiz.base.util.UtilMisc"].toMap("geoId", countryGeoId), true)>
<option value="${countryGeoId}">${geo.geoName!}</option>
<option value="${countryGeoId}">---</option>
<option value="${countryGeoId}" selected="selected">${geo.geoName!}</option>
<option value="" >${uiLabelMap.CommonAny}</option>
<#else>
<option value="">---</option>
<option value="" selected="selected">${uiLabelMap.CommonAny}</option>
</#if>
${screens.render("component://common/widget/CommonScreens.xml#countries")}
</select>
@@ -18,7 +18,7 @@ under the License.
-->
<#assign countries = Static["org.apache.ofbiz.common.CommonWorkers"].getCountryList(delegator)>
<#list countries as country>
<#if defaultCountryGeoId??>
<#if defaultCountryGeoId?? && ! doNotPreselectDefaultCountryGeoId??>
<option value='${country.geoId}' ${(country.geoId==defaultCountryGeoId)?string("selected=\"selected\"","")}>${country.get("geoName",locale)?default(country.geoId)}</option>
<#else>
<option value='${country.geoId}'>${country.get("geoName",locale)?default(country.geoId)}</option>

0 comments on commit cbc0a76

Please sign in to comment.
You can’t perform that action at this time.