svn commit: r1037521 - /ofbiz/trunk/framework/common/webcommon/includes/countries.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1037521 - /ofbiz/trunk/framework/common/webcommon/includes/countries.ftl

jleroux@apache.org
Author: jleroux
Date: Sun Nov 21 18:33:41 2010
New Revision: 1037521

URL: http://svn.apache.org/viewvc?rev=1037521&view=rev
Log:
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>