Author: hansbak
Date: Tue Sep 15 06:04:28 2009 New Revision: 815156 URL: http://svn.apache.org/viewvc?rev=815156&view=rev Log: show email address if possible on email send form Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventScreens.xml Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl?rev=815156&r1=815155&r2=815156&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl Tue Sep 15 06:04:28 2009 @@ -104,6 +104,7 @@ ${contactMech.infoString?if_exists} <form method="post" action="<@ofbizUrl>NewDraftCommunicationEvent</@ofbizUrl>" onSubmit="javascript:submitFormDisableSubmits(this)" name="createEmail${contactMech.infoString?replace("@","")?replace(".","")}"> <input name="partyIdFrom" value="${userLogin.partyId}" type="hidden"/> + <input name="partyIdTo" value="${partyId}" type="hidden"/> <input name="contactMechIdTo" value="${contactMech.contactMechId}" type="hidden"/> <input name="my" value="My" type="hidden"/> <input name="statusId" value="COM_PENDING" type="hidden"/> Modified: ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml?rev=815156&r1=815155&r2=815156&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml Tue Sep 15 06:04:28 2009 @@ -142,6 +142,9 @@ </condition-list> <order-by field-name="infoString"/> </entity-condition> + <entity-one entity-name="ContactMech" value-field="contactMechTo"> + <field-map field-name="contactMechId" from-field="contactMechIdTo"/> + </entity-one> </actions> <alt-target use-when="communicationEvent!=null" target="sendCommunicationEvent"/> <field name="communicationEventId"><hidden/></field> @@ -157,7 +160,10 @@ <list-options list-name="emailAddresses" description="${infoString}" key-name="contactMechId"/> </drop-down> </field> - <field name="partyIdTo" position="1"> + <field name="partyIdTo" position="1" tooltip="Email: ${contactMechTo.infoString}" use-when="contactMechTo!=null"> + <lookup target-form-name="LookupPartyName" default-value="${partyIdTo}"/> + </field> + <field name="partyIdTo" position="1" use-when="contactMechTo==null"> <lookup target-form-name="LookupPartyName" default-value="${partyIdTo}"/> </field> <field name="datetimeStarted" title="${uiLabelMap.CommonSendDate}" position="2"><date-time type="date"/></field> Modified: ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventScreens.xml?rev=815156&r1=815155&r2=815156&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventScreens.xml Tue Sep 15 06:04:28 2009 @@ -342,7 +342,8 @@ <set field="my" from-field="parameters.my" default-value=""/> <entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/> <set field="partyIdFrom" from-field="communicationEvent.partyIdFrom" default-value="${userLogin.partyId}"/> - <set field="contactMechIdTo" from-field="communicationEvent.contactMechIdTo" default-value="${parameters.contactMechIdTo}"/> + <!-- if contactmechIdTo provided should override the one in the db record: see contacts.ftl where this is used. --> + <set field="contactMechIdTo" from-field="parameters.contactMechIdTo" default-value="${communicationEvent.contactMechIdTo}"/> </actions> <widgets> <decorator-screen name="Common${my}CommunicationEventDecorator" location="${parameters.mainDecoratorLocation}"> |
Free forum by Nabble | Edit this page |