You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mo...@apache.org on 2008/05/24 15:41:39 UTC

svn commit: r659822 - in /ofbiz/trunk/applications/marketing: config/ script/org/ofbiz/sfa/contact/ script/org/ofbiz/sfa/lead/ servicedef/ webapp/sfa/WEB-INF/ widget/sfa/ widget/sfa/forms/

Author: mor
Date: Sat May 24 06:41:38 2008
New Revision: 659822

URL: http://svn.apache.org/viewvc?rev=659822&view=rev
Log:
Patch for adding lead/contact from left bar screen in sfa. This gives the option to create lead/contact by entering minimal fields like firstName, lastName and emailAddress. As the implementation done is same for lead and contact, it can be improved in two ways. (1) Either to move the code to a method which can be called inline in createLead, createContact services (2) By modifying generic method createPersonRoleAndContactMechs so that Address can be bypassed with a flag (Since quick add lead / contact form does not have address fields). I will work on the improvement in next few days. This patch (quickAdd.patch) is applied from Jira issue OFBIZ-1642(https://issues.apache.org/jira/browse/OFBIZ-1642). Thanks Jyotsna Rathore for this patch, special thanks to Mridul Pathak for review and help.

Modified:
    ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml
    ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/contact/ContactServices.xml
    ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
    ofbiz/trunk/applications/marketing/servicedef/services.xml
    ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml
    ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml
    ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml
    ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml
    ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml
    ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml
    ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml

Modified: ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml?rev=659822&r1=659821&r2=659822&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml (original)
+++ ofbiz/trunk/applications/marketing/config/MarketingUiLabels.xml Sat May 24 06:41:38 2008
@@ -1266,8 +1266,8 @@
     <property key="SfaQuickAddContact">
         <value xml:lang="en">Quick Add Contact</value>
     </property>
-    <property key="SfaQuickAddContactForm">
-        <value xml:lang="en">Quick Add Contact Form</value>
+    <property key="SfaQuickAddLead">
+        <value xml:lang="en">Quick Add Lead</value>
     </property>
     <property key="SfaSecondContact">
         <value xml:lang="en">Second Contact</value>

Modified: ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/contact/ContactServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/contact/ContactServices.xml?rev=659822&r1=659821&r2=659822&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/contact/ContactServices.xml (original)
+++ ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/contact/ContactServices.xml Sat May 24 06:41:38 2008
@@ -22,14 +22,45 @@
     xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
     <simple-method short-description="Create Contact" method-name="createContact">
         <set field="parameters.roleTypeId" value="CONTACT"/>
-        <call-simple-method method-name="createPersonRoleAndContactMechs" xml-resource="org/ofbiz/party/party/PartySimpleMethods.xml"/>
-        <set field="partyId" from-field="parameters.partyId"></set>
-        <set field="partyRelationContext.partyIdFrom" from-field="userLogin.partyId"/>
-        <set field="partyRelationContext.partyIdTo" from-field="partyId" />
-        <set field="partyRelationContext.roleTypeIdTo" from-field="parameters.roleTypeId"/>
-        <set field="partyRelationContext.roleTypeIdFrom" value="_NA_"/>
-        <set field="partyRelationContext.partyRelationshipTypeId" value="CONTACT_REL"></set>
-        <call-service service-name="createPartyRelationship" in-map-name="partyRelationContext"/>
+        <if-compare field-name="parameters.quickAdd" operator="not-equals" value="true">
+            <call-simple-method method-name="createPersonRoleAndContactMechs" xml-resource="org/ofbiz/party/party/PartySimpleMethods.xml"/>
+        <else>
+            <call-map-processor processor-name="person" in-map-name="parameters" out-map-name="personCtx"
+                xml-resource="org/ofbiz/party/party/PartyMapProcs.xml"/>        
+            <call-service service-name="createPerson" in-map-name="personCtx">
+                <result-to-field result-name="partyId" field-name="partyId"/>
+                <result-to-result result-name="partyId" service-result-name="partyId"/>
+            </call-service>
+            <if-not-empty field-name="parameters.roleTypeId">
+                <set field="createPartyRoleCtx.partyId" from-field="partyId"/>
+                <set field="createPartyRoleCtx.roleTypeId" from-field="parameters.roleTypeId"/>
+                <call-service service-name="createPartyRole" in-map-name="createPartyRoleCtx"/>
+            </if-not-empty>     
+            <if-not-empty field-name="parameters.emailAddress">
+                <call-map-processor in-map-name="parameters" out-map-name="emailAddressCtx">
+                    <simple-map-processor name="emailAddress">
+                        <process field="emailAddress">
+                            <copy/><validate-method method="isEmail"><fail-property resource="PartyUiLabels" property="PartyEmailAddressNotFormattedCorrectly"/></validate-method>
+                        </process>
+                    </simple-map-processor>
+                </call-map-processor>
+                <check-errors/>
+                <set field="emailAddressCtx.partyId" from-field="partyId"/>
+                <set field="emailAddressCtx.contactMechPurposeTypeId" value="PRIMARY_EMAIL"/>
+                <call-service service-name="createPartyEmailAddress" in-map-name="emailAddressCtx">
+                    <result-to-field result-name="contactMechId" field-name="emailContactMechId"/>
+                </call-service> 
+            </if-not-empty>
+        </else>
+        </if-compare>
+                
+        <set field="partyId" from-field="parameters.partyId"/>
+        <set field="partyRelationCtx.partyIdFrom" from-field="userLogin.partyId"/>
+        <set field="partyRelationCtx.partyIdTo" from-field="partyId" />
+        <set field="partyRelationCtx.roleTypeIdTo" from-field="parameters.roleTypeId"/>
+        <set field="partyRelationCtx.roleTypeIdFrom" value="_NA_"/>
+        <set field="partyRelationCtx.partyRelationshipTypeId" value="CONTACT_REL"/>
+        <call-service service-name="createPartyRelationship" in-map-name="partyRelationCtx"/>
         <field-to-result field-name="partyId"/>
     </simple-method>
 

Modified: ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml?rev=659822&r1=659821&r2=659822&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml (original)
+++ ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml Sat May 24 06:41:38 2008
@@ -22,21 +22,51 @@
     xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
 
     <simple-method method-name="createLead"  short-description="create Lead Person or Lead Group">
-    
         <set field="parameters.roleTypeId" value="LEAD"/>
-        <call-simple-method method-name="createPersonRoleAndContactMechs" xml-resource="org/ofbiz/party/party/PartySimpleMethods.xml"/>
+        <if-compare field-name="parameters.quickAdd" operator="not-equals" value="Y">
+            <call-simple-method method-name="createPersonRoleAndContactMechs" xml-resource="org/ofbiz/party/party/PartySimpleMethods.xml"/>
+        <else>
+            <call-map-processor processor-name="person" in-map-name="parameters" out-map-name="personCtx"
+                xml-resource="org/ofbiz/party/party/PartyMapProcs.xml"/>        
+            <call-service service-name="createPerson" in-map-name="personCtx">
+                <result-to-field result-name="partyId" field-name="partyId"/>
+                <result-to-result result-name="partyId" service-result-name="partyId"/>
+            </call-service>
+            <if-not-empty field-name="parameters.roleTypeId">
+                <set field="createPartyRoleCtx.partyId" from-field="partyId"/>
+                <set field="createPartyRoleCtx.roleTypeId" from-field="parameters.roleTypeId"/>
+                <call-service service-name="createPartyRole" in-map-name="createPartyRoleCtx"/>
+            </if-not-empty>     
+            <if-not-empty field-name="parameters.emailAddress">
+                <call-map-processor in-map-name="parameters" out-map-name="emailAddressCtx">
+                    <simple-map-processor name="emailAddress">
+                        <process field="emailAddress">
+                            <copy/><validate-method method="isEmail"><fail-property resource="PartyUiLabels" property="PartyEmailAddressNotFormattedCorrectly"/></validate-method>
+                        </process>
+                    </simple-map-processor>
+                </call-map-processor>
+                <check-errors/>
+                <set field="emailAddressCtx.partyId" from-field="partyId"/>
+                <set field="emailAddressCtx.contactMechPurposeTypeId" value="PRIMARY_EMAIL"/>
+                <call-service service-name="createPartyEmailAddress" in-map-name="emailAddressCtx">
+                    <result-to-field result-name="contactMechId" field-name="emailContactMechId"/>
+                </call-service> 
+            </if-not-empty>
+        </else>
+        </if-compare>
+        
         <if-not-empty field-name="userLogin.partyId">
             
             <set field="createPartyRoleCtx.partyId" from-field="userLogin.partyId"/>
             <set field="createPartyRoleCtx.roleTypeId" value="OWNER"/>
             <call-service service-name="createPartyRole" in-map-name="createPartyRoleCtx"/>
                         
-            <set field="partyRelationshipContext.partyIdFrom" from-field="userLogin.partyId"/>
-            <set field="partyRelationshipContext.partyIdTo" from-field="partyId"/>
-            <set field="partyRelationshipContext.roleTypeIdFrom" value="OWNER"/>
-            <set field="partyRelationshipContext.roleTypeIdTo" value="LEAD"/>
-            <set field="partyRelationshipContext.partyRelationshipTypeId" value="LEAD_OWNER"/>
-            <call-service service-name="createPartyRelationship" in-map-name="partyRelationshipContext"/>
+            <set field="partyRelationshipCtx.partyIdFrom" from-field="userLogin.partyId"/>
+            <set field="partyRelationshipCtx.partyIdTo" from-field="partyId"/>
+            <set field="partyRelationshipCtx.roleTypeIdFrom" value="OWNER"/>
+            <set field="partyRelationshipCtx.roleTypeIdTo" value="LEAD"/>
+            <set field="partyRelationshipCtx.partyRelationshipTypeId" value="LEAD_OWNER"/>
+            <call-service service-name="createPartyRelationship" in-map-name="partyRelationshipCtx"/>
             
             <set field="updatePartyCtx.partyId" from-field="partyId"/>
             <set field="updatePartyCtx.statusId" value="LEAD_ASSIGNED"/>
@@ -45,9 +75,9 @@
         <!-- Now create PartyGroup corresponding to the companyName, if its not null and then set up relationship of Person and PartyGroup as Employee and title -->
         <if-not-empty field-name="parameters.groupName">
             <set field="parameters.partyTypeId" value="PARTY_GROUP"/>    
-            <call-map-processor processor-name="partyGroup" in-map-name="parameters" out-map-name="partyGroupContext"
+            <call-map-processor processor-name="partyGroup" in-map-name="parameters" out-map-name="partyGroupCtx"
                 xml-resource="org/ofbiz/party/party/PartyMapProcs.xml"/>
-            <call-service service-name="createPartyGroup" in-map-name="partyGroupContext">
+            <call-service service-name="createPartyGroup" in-map-name="partyGroupCtx">
                 <result-to-field result-name="partyId" field-name="partyGroupPartyId"/>        
             </call-service>
             <set field="createPartyRoleCtx.partyId" from-field="partyGroupPartyId"/>
@@ -58,13 +88,13 @@
             <set field="createPartyRoleCtx.roleTypeId" value="EMPLOYEE"/>
             <call-service service-name="createPartyRole" in-map-name="createPartyRoleCtx"/>
           
-            <set field="partyRelationshipContext.partyIdFrom" from-field="partyGroupPartyId"/>
-            <set field="partyRelationshipContext.partyIdTo" from-field="partyId"/>
-            <set field="partyRelationshipContext.roleTypeIdFrom" value="LEAD"/>
-            <set field="partyRelationshipContext.roleTypeIdTo" value="EMPLOYEE"/>
-            <set field="partyRelationshipContext.positionTitle" from-field="parameters.title"/>
-            <set field="partyRelationshipContext.partyRelationshipTypeId" value="EMPLOYMENT"/>
-            <call-service service-name="createPartyRelationship" in-map-name="partyRelationshipContext"/>
+            <set field="partyRelationshipCtx.partyIdFrom" from-field="partyGroupPartyId"/>
+            <set field="partyRelationshipCtx.partyIdTo" from-field="partyId"/>
+            <set field="partyRelationshipCtx.roleTypeIdFrom" value="LEAD"/>
+            <set field="partyRelationshipCtx.roleTypeIdTo" value="EMPLOYEE"/>
+            <set field="partyRelationshipCtx.positionTitle" from-field="parameters.title"/>
+            <set field="partyRelationshipCtx.partyRelationshipTypeId" value="EMPLOYMENT"/>
+            <call-service service-name="createPartyRelationship" in-map-name="partyRelationshipCtx"/>
         </if-not-empty>
         
         <log level="verbose" message=" ${partyGroupPartyId}"></log>

Modified: ofbiz/trunk/applications/marketing/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/servicedef/services.xml?rev=659822&r1=659821&r2=659822&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/marketing/servicedef/services.xml Sat May 24 06:41:38 2008
@@ -407,6 +407,7 @@
         <attribute name="partyIdFrom" type="String" mode="IN" optional="true"/>
         <attribute name="leadSource" type="String" mode="IN" optional="true"/>
         <attribute name="roleTypeId" type="String" mode="OUT"/>
+        <attribute name="quickAdd" type="String" mode="IN" optional="true"/>
     </service>
     <service name="createContact" engine="simple"
         location="org/ofbiz/sfa/contact/ContactServices.xml" invoke="createContact">
@@ -423,6 +424,7 @@
         <attribute name="partyId" type="String" mode="OUT" />
         <attribute name="emailAddress" type="String" mode="IN" optional="true"/>
         <attribute name="partyIdFrom" type="String" mode="IN" optional="true"/>
+        <attribute name="quickAdd" type="String" mode="IN" optional="true"/>
     </service>
     <service name="mergeContacts" engine="simple" 
         location="org/ofbiz/sfa/contact/ContactServices.xml" invoke="mergeContacts">

Modified: ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml?rev=659822&r1=659821&r2=659822&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml Sat May 24 06:41:38 2008
@@ -133,12 +133,17 @@
         <response name="success" type="view" value="viewprofile"/><!-- What would be the view in case a vCard has more than one contact -->
         <response name="error" type="view" value="CreateLeadFromVCard"/>
     </request-map>  
+    <request-map uri="quickAddLead">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createLead"/>
+        <response name="success" type="view" value="viewprofile"/>
+    </request-map>   
     <!-- Contact Requests -->
     <request-map uri="FindContacts">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="FindContacts"/>
     </request-map>
-        <request-map uri="CreateContact">
+    <request-map uri="CreateContact">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="CreateContact"/>
     </request-map>
@@ -174,6 +179,10 @@
         <response name="success" type="view" value="FindContacts"/><!-- This need to be fixed -->
         <response name="error" type="view" value="FindContacts"/>
     </request-map>        
+    <request-map uri="quickAddContact">   
+        <event type="service" invoke="createContact"/>
+        <response name="success" type="view" value="viewprofile"/>
+    </request-map> 
     <!-- end of request mappings -->
 
     <!-- View Mappings -->

Modified: ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml?rev=659822&r1=659821&r2=659822&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml Sat May 24 06:41:38 2008
@@ -71,13 +71,14 @@
         <section>
             <widgets>
                 <container style="left">
-                    <include-screen name="miniAddContact"/>
+                    <include-screen name="MiniAddContact"/>
+                    <include-screen name="MiniAddLead"/>
                 </container>
             </widgets>
         </section>
     </screen>
     
-    <screen name="miniAddContact">
+    <screen name="MiniAddContact">
         <section>
             <widgets>
                 <container style="screenlet">
@@ -88,7 +89,8 @@
                     </container>
                     <container style="screenlet-body">
                         <section>
-                            <widgets><label text="${uiLabelMap.SfaQuickAddContactForm}"></label>    
+                            <widgets>
+                                <include-form name="QuickAddContact" location="component://marketing/widget/sfa/forms/ContactForms.xml"/>    
                             </widgets>
                         </section>
                     </container> 
@@ -96,6 +98,26 @@
             </widgets>
         </section>
     </screen>
+    <screen name="MiniAddLead">
+        <section>
+            <widgets>
+                <container style="screenlet" id="miniQuickAddLead">
+                    <container style="screenlet-title-bar">
+                        <container style="h3">
+                            <label text="${uiLabelMap.SfaQuickAddLead}"></label>
+                        </container>
+                    </container>
+                    <container style="screenlet-body">
+                        <section>
+                            <widgets>
+                                <include-form name="QuickAddLead" location="component://marketing/widget/sfa/forms/LeadForms.xml"/>
+                            </widgets>
+                        </section>
+                    </container> 
+                </container>
+            </widgets>
+        </section>
+    </screen>  
     <screen name="CommonOpportunityDecorator">
         <section>
             <actions>
@@ -189,11 +211,7 @@
                     <decorator-section name="body">
                         <section>
                             <widgets>
-                                <section>
-                                    <widgets>                                        
-                                        <include-menu name="LeadTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
-                                    </widgets>
-                                </section>   
+                                <include-menu name="LeadTabBar" location="component://marketing/widget/sfa/SfaMenus.xml"/>
                                 <decorator-section-include name="body"/>
                             </widgets>
                             <fail-widgets>

Modified: ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml?rev=659822&r1=659821&r2=659822&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/ContactScreens.xml Sat May 24 06:41:38 2008
@@ -80,6 +80,7 @@
             <actions>
                 <set field="titleProperty" value="PageTitleCreateContact"/>
                 <set field="tabButtonItem" value="Contacts"/>
+                <property-to-field field="defaultCountryGeoId" resource="general" property="country.geo.id.default" default="USA"/>
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">

Modified: ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml?rev=659822&r1=659821&r2=659822&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml Sat May 24 06:41:38 2008
@@ -77,6 +77,7 @@
             <actions>
                 <set field="titleProperty" value="PageTitleCreateLead"/>
                 <set field="tabButtonItem" value="Leads"/>
+                <property-to-field field="defaultCountryGeoId" resource="general" property="country.geo.id.default" default="USA"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonLeadDecorator" location="${parameters.mainDecoratorLocation}">

Modified: ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml?rev=659822&r1=659821&r2=659822&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/SfaMenus.xml Sat May 24 06:41:38 2008
@@ -52,10 +52,10 @@
         <menu-item name="CreateLead" title="${uiLabelMap.CommonCreate} ${uiLabelMap.SfaLead}">
             <link target="CreateLead"/>
         </menu-item>      
-        <menu-item name="createLeadFromVCard" title="${uiLabelMap.SfaImportLead}">
+        <menu-item name="CreateLeadFromVCard" title="${uiLabelMap.SfaImportLead}">
             <link target="CreateLeadFromVCard"/>
         </menu-item>      
-        <menu-item name="convertLead" title="${uiLabelMap.SfaConvertLead}">
+        <menu-item name="ConvertLead" title="${uiLabelMap.SfaConvertLead}">
             <condition><not><if-empty field-name="parameters.partyId"/></not></condition>
             <link target="ConvertLead?leadPartyId=${parameters.partyId}"/>
         </menu-item>
@@ -69,7 +69,7 @@
     </menu>
     
     <menu name="ContactTabBar" type="simple" menu-container-style="button-bar tab-bar" default-selected-style="selected"> 
-       <menu-item name="createNew" title="${uiLabelMap.CommonCreateNew}">
+        <menu-item name="createNew" title="${uiLabelMap.CommonCreateNew}">
             <link target="CreateContact"/>
         </menu-item>
         <menu-item name="createContactFromVCard" title="${uiLabelMap.SfaCreateContactFromVCard}">

Modified: ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml?rev=659822&r1=659821&r2=659822&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/forms/ContactForms.xml Sat May 24 06:41:38 2008
@@ -92,4 +92,12 @@
         <field name="serviceName"><hidden value="createContact"/></field>
         <field name="submitButton" title="${uiLabelMap.CommonUpload}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
+  
+    <form name="QuickAddContact" type="single" target="quickAddContact">
+        <field name="firstName"  title="${uiLabelMap.CommonFirst} ${uiLabelMap.CommonName}*" widget-style="required"><text size="20"/></field>
+        <field name="lastName" title="${uiLabelMap.CommonLast} ${uiLabelMap.CommonName}*" widget-style="required"><text size="20"/></field>
+        <field name="emailAddress" title="${uiLabelMap.CommonEmail}"><text size="20"/></field>
+        <field name="quickAdd"><hidden value="Y"/></field>
+        <field name="submitButton"><submit/></field>
+    </form>  
 </forms>

Modified: ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml?rev=659822&r1=659821&r2=659822&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml Sat May 24 06:41:38 2008
@@ -30,6 +30,7 @@
             <entity-one entity-name="PartyType" value-name="partyType">
                 <field-map field-name="partyTypeId" env-name="partyRow.partyTypeId"/>
             </entity-one>
+            <set field="statusId" from-field="partyRow.statusId"/>
         </row-actions>
         <field name="partyId" title="${uiLabelMap.PartyPartyId}">
             <hyperlink target="viewprofile?partyId=${partyRow.partyId}&amp;roleTypeId=LEAD" description="${partyRow.partyId}" target-type="inter-app"/>
@@ -118,5 +119,14 @@
         <field name="infile" title="${uiLabelMap.SfaUploadVCard}"><file/></field>
         <field name="serviceName"><hidden value="createLead"/></field>
         <field name="submitButton" title="${uiLabelMap.CommonUpload}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>    
+   
+    <form name="QuickAddLead" type="single" target="quickAddLead">
+        <field name="firstName" title="${uiLabelMap.CommonFirst} ${uiLabelMap.CommonName}*" widget-style="required"><text size="20"/></field>
+        <field name="lastName" title="${uiLabelMap.CommonLast} ${uiLabelMap.CommonName}*" widget-style="required"><text size="20"/></field>
+        <field name="groupName" title="${uiLabelMap.CommonGroup}"><text size="20"/></field>
+        <field name="emailAddress" title="${uiLabelMap.CommonEmail}"><text size="20"/></field>
+        <field name="quickAdd"><hidden value="Y"/></field>
+        <field name="submitButton"><submit/></field>
     </form>     
 </forms>