A patch from Tom Burns for "Facility Edit Contact Information use Dependent drop-downs" https://issues.apache.org/jira/browse/OFBIZ-4798
Now uses the dependent drop-down mechanism as it was recently done for Party Profile git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1324573 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -57,7 +57,7 @@ under the License.
|
||||
<div><span class="label">(${uiLabelMap.PartyMsgContactHavePurpose}</span>"${contactMechPurposeType.get("description",locale)?if_exists}")</div>
|
||||
</#if>
|
||||
<table width="90%" class="basic-table" cellspacing="0">
|
||||
<form method="post" action='<@ofbizUrl>${mechMap.requestName}</@ofbizUrl>' name="editcontactmechform">
|
||||
<form method="post" action='<@ofbizUrl>${mechMap.requestName}</@ofbizUrl>' name="editcontactmechform" id="editcontactmechform">
|
||||
<input type='hidden' name='DONE_PAGE' value='${donePage}' />
|
||||
<input type='hidden' name='contactMechTypeId' value='${mechMap.contactMechTypeId}' />
|
||||
<input type='hidden' name='facilityId' value='${facilityId}' />
|
||||
@@ -136,7 +136,7 @@ under the License.
|
||||
</td>
|
||||
</tr>
|
||||
</#if>
|
||||
<form method="post" action='<@ofbizUrl>${mechMap.requestName}</@ofbizUrl>' name="editcontactmechform">
|
||||
<form method="post" action='<@ofbizUrl>${mechMap.requestName}</@ofbizUrl>' name="editcontactmechform" id="editcontactmechform">
|
||||
<input type="hidden" name="contactMechId" value='${contactMechId}' />
|
||||
<input type="hidden" name="contactMechTypeId" value='${mechMap.contactMechTypeId}' />
|
||||
<input type="hidden" name='facilityId' value='${facilityId}' />
|
||||
@@ -176,12 +176,9 @@ under the License.
|
||||
<tr>
|
||||
<td class="label">${uiLabelMap.PartyState}</td>
|
||||
<td>
|
||||
<select name="stateProvinceGeoId" class="required">
|
||||
<option>${(mechMap.postalAddress.stateProvinceGeoId)?if_exists}</option>
|
||||
<option></option>
|
||||
${screens.render("component://common/widget/CommonScreens.xml#states")}
|
||||
<select name="stateProvinceGeoId" id="editcontactmechform_stateProvinceGeoId">
|
||||
</select>
|
||||
*</td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">${uiLabelMap.PartyZipCode}</td>
|
||||
@@ -189,15 +186,22 @@ under the License.
|
||||
<input type="text" class="required" size="12" maxlength="10" name="postalCode" value="${(mechMap.postalAddress.postalCode)?default(request.getParameter('postalCode')?if_exists)}" />
|
||||
*</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">${uiLabelMap.PartyCountry}</td>
|
||||
<td>
|
||||
<select name="countryGeoId" class="required">
|
||||
<option>${(mechMap.postalAddress.countryGeoId)?if_exists}</option>
|
||||
<option></option>
|
||||
${screens.render("component://common/widget/CommonScreens.xml#countries")}
|
||||
<tr>
|
||||
<td class="label">${uiLabelMap.CommonCountry}</td>
|
||||
<td>
|
||||
<select name="countryGeoId" id="editcontactmechform_countryGeoId">
|
||||
${screens.render("component://common/widget/CommonScreens.xml#countries")}
|
||||
<#if (mechMap.postalAddress?exists) && (mechMap.postalAddress.countryGeoId?exists)>
|
||||
<#assign defaultCountryGeoId = mechMap.postalAddress.countryGeoId>
|
||||
<#else>
|
||||
<#assign defaultCountryGeoId = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties", "country.geo.id.default")>
|
||||
</#if>
|
||||
<option selected="selected" value="${defaultCountryGeoId}">
|
||||
<#assign countryGeo = delegator.findByPrimaryKey("Geo",Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId",defaultCountryGeoId))>
|
||||
${countryGeo.get("geoName",locale)}
|
||||
</option>
|
||||
</select>
|
||||
*</td>
|
||||
</td>
|
||||
</tr>
|
||||
<#elseif "TELECOM_NUMBER" = mechMap.contactMechTypeId?if_exists>
|
||||
<tr>
|
||||
|
||||
@@ -834,6 +834,17 @@ under the License.
|
||||
<actions>
|
||||
<set field="tabButtonItem" value="ViewContactMechs"/>
|
||||
<script location="component://product/webapp/facility/WEB-INF/actions/facility/EditContactMech.groovy"/>
|
||||
|
||||
<set field="dependentForm" value="editcontactmechform"/>
|
||||
<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="mechMap.postalAddress.stateProvinceGeoId" default-value="_none_"/>
|
||||
|
||||
<set field="facilityId" from-field="parameters.facilityId"/>
|
||||
<entity-one entity-name="Facility" value-field="facility"/>
|
||||
<property-map resource="ProductUiLabels" map-name="uiLabelMap"/>
|
||||
@@ -852,7 +863,10 @@ under the License.
|
||||
<decorator-screen name="CommonFacilityDecorator" location="${parameters.commonFacilityDecoratorLocation}">
|
||||
<decorator-section name="body">
|
||||
<platform-specific>
|
||||
<html><html-template location="component://product/webapp/facility/facility/EditContactMech.ftl"/></html>
|
||||
<html>
|
||||
<html-template location="component://common/webcommon/includes/setDependentDropdownValuesJs.ftl"/>
|
||||
<html-template location="component://product/webapp/facility/facility/EditContactMech.ftl"/>
|
||||
</html>
|
||||
</platform-specific>
|
||||
</decorator-section>
|
||||
</decorator-screen>
|
||||
|
||||
Reference in New Issue
Block a user