Author: jleroux
Date: Sun Nov 21 18:33:41 2010
New Revision: 1037521
URL:
http://svn.apache.org/viewvc?rev=1037521&view=revLog:
A patch from Eric de Maulde "Preselect default country into drop down" (
https://issues.apache.org/jira/browse/OFBIZ-4013) - OFBIZ-4013
Modified:
ofbiz/trunk/framework/common/webcommon/includes/countries.ftl
Modified: ofbiz/trunk/framework/common/webcommon/includes/countries.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/countries.ftl?rev=1037521&r1=1037520&r2=1037521&view=diff==============================================================================
--- ofbiz/trunk/framework/common/webcommon/includes/countries.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/includes/countries.ftl Sun Nov 21 18:33:41 2010
@@ -16,8 +16,11 @@ KIND, either express or implied. See th
specific language governing permissions and limitations
under the License.
-->
-<#assign countries = Static["org.ofbiz.common.CommonWorkers"].getCountryList(delegator)>
+<#assign
+ countries = Static["org.ofbiz.common.CommonWorkers"].getCountryList(delegator)
+ defaultCountryId = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general","country.geo.id.default")
+>
<#list countries as country>
- <option value='${country.geoId}'>${country.get("geoName",locale)?default(country.geoId)}</option>
+ <option value='${country.geoId}'<#if country.geoId == defaultCountryId> selected="selected"</#if>>${country.get("geoName",locale)?default(country.geoId)}</option>
</#list>