svn commit: r652894 - in /ofbiz/trunk/applications/humanres: config/ script/org/ofbiz/humanres/ script/org/ofbiz/humanres/humanres/ servicedef/ webapp/humanres/WEB-INF/ webapp/humanres/includes/ widget/ widget/forms/

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

svn commit: r652894 - in /ofbiz/trunk/applications/humanres: config/ script/org/ofbiz/humanres/ script/org/ofbiz/humanres/humanres/ servicedef/ webapp/humanres/WEB-INF/ webapp/humanres/includes/ widget/ widget/forms/

apatel-2
Author: apatel
Date: Fri May  2 13:28:03 2008
New Revision: 652894

URL: http://svn.apache.org/viewvc?rev=652894&view=rev
Log:
Simple screen and service for creating an employee. Thanks Harsha for the Patch.

Added:
    ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/humanres/
    ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/humanres/HumanResMapProcs.xml   (with props)
Modified:
    ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml
    ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml
    ofbiz/trunk/applications/humanres/servicedef/services.xml
    ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml
    ofbiz/trunk/applications/humanres/webapp/humanres/includes/appheader.ftl
    ofbiz/trunk/applications/humanres/widget/CommonScreens.xml
    ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml
    ofbiz/trunk/applications/humanres/widget/forms/EmploymentForms.xml

Modified: ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml?rev=652894&r1=652893&r2=652894&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml (original)
+++ ofbiz/trunk/applications/humanres/config/HumanResUiLabels.xml Fri May  2 13:28:03 2008
@@ -477,6 +477,9 @@
         <value xml:lang="it">Aggiorna Validità Responsibilità</value>
         <value xml:lang="th">แก้ไขหน้าที่รับผิดชอบ</value>
     </property>
+    <property key="HumanResEmployee">
+        <value xml:lang="en">Employee</value>
+    </property>    
     <property key="HumanResEmplPositionId">
         <value xml:lang="en">Employee Position Id</value>
         <value xml:lang="it">Codice Posizione Impiegato</value>

Modified: ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml?rev=652894&r1=652893&r2=652894&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml (original)
+++ ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml Fri May  2 13:28:03 2008
@@ -465,4 +465,69 @@
         <entity-one entity-name="SkillType" value-name="lookedUpValue"/>        
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
-</simple-methods>        
+    
+    <simple-method method-name="createEmployee" short-description="Create New Employee">
+        <if-not-empty field-name="generalAddressLine1" map-name="parameters">
+            <call-map-processor xml-resource="org/ofbiz/humanres/humanres/HumanResMapProcs.xml" processor-name="postalAddressGeneral" in-map-name="parameters" out-map-name="partyPostalAddressCtx"/>                  
+        </if-not-empty>
+        <if-not-empty field-name="workContactNumber" map-name="parameters">
+            <call-map-processor xml-resource="org/ofbiz/humanres/humanres/HumanResMapProcs.xml" processor-name="workPhoneNumber" in-map-name="parameters" out-map-name="workTelecomCtx"/>            
+        </if-not-empty>
+        <if-not-empty field-name="mobileContactNumber" map-name="parameters">
+            <call-map-processor xml-resource="org/ofbiz/humanres/humanres/HumanResMapProcs.xml" processor-name="mobileNumber" in-map-name="parameters" out-map-name="mobileTelecomCtx"/>            
+        </if-not-empty>
+        <if-not-empty field-name="otherEmail" map-name="parameters">
+            <call-map-processor xml-resource="org/ofbiz/humanres/humanres/HumanResMapProcs.xml" processor-name="otherEmail" in-map-name="parameters" out-map-name="partyEmailCtx"/>            
+        </if-not-empty>
+        <check-errors/>
+        
+        <set field="partyTypeId" value="PERSON"/>
+        <set field="parameters.roleTypeId" value="EMPLOYEE"/>
+        <call-simple-method method-name="createPersonRoleAndContactMechs" xml-resource="org/ofbiz/party/party/PartySimpleMethods.xml"/>
+        
+        <if-not-empty field-name="parameters.partyIdFrom">
+            <set field="partyRelationshipCtx.partyId" from-field="partyId"/>
+            <set field="partyRelationshipCtx.partyIdFrom" from-field="parameters.partyIdFrom"/>
+            <set field="partyRelationshipCtx.partyIdTo" from-field="partyId"/>
+            <set field="partyRelationshipCtx.roleTypeIdFrom" value="INTERNAL_ORGANIZATIO"/>
+            <set field="partyRelationshipCtx.roleTypeIdTo" value="EMPLOYEE"/>
+            <set field="partyRelationshipCtx.relationshipName" value="EMPLOYMENT"/>
+            <set field="partyRelationshipCtx.fromDate" value="parameters.fromDate"/>
+            <call-service service-name="createPartyRelationship" in-map-name="partyRelationshipCtx"/>
+        </if-not-empty>
+        
+        <if-not-empty field-name="generalAddressLine1" map-name="parameters">
+            <set field="partyPostalAddressCtx.partyId" from-field="partyId"/>
+            <set field="partyPostalAddressCtx.contactMechPurposeTypeId" value="GENERAL_LOCATION"/>
+            <call-service service-name="createPartyPostalAddress" in-map-name="partyPostalAddressCtx">
+                <result-to-field result-name="contactMechId" field-name="contactMechId"/>
+            </call-service>    
+        </if-not-empty>                      
+        
+        <if-not-empty field-name="workContactNumber" map-name="parameters">
+            <set field="workTelecomCtx.partyId" from-field="partyId"/>
+            <set field="workTelecomCtx.contactMechPurposeTypeId" value="PHONE_WORK"/>  
+            <call-service service-name="createPartyTelecomNumber" in-map-name="workTelecomCtx">
+                <result-to-field result-name="contactMechId" field-name="contactMechId"/>
+            </call-service>
+        </if-not-empty>
+
+        <if-not-empty field-name="mobileContactNumber" map-name="parameters">
+            <set field="mobileTelecomCtx.partyId" from-field="partyId"/>
+            <set field="mobileTelecomCtx.contactMechPurposeTypeId" value="PHONE_MOBILE"/>  
+            <call-service service-name="createPartyTelecomNumber" in-map-name="mobileTelecomCtx">
+                <result-to-field result-name="contactMechId" field-name="contactMechId"/>
+            </call-service>
+        </if-not-empty>
+        
+        <if-not-empty field-name="otherEmail" map-name="parameters">
+            <set field="partyEmailCtx.partyId" from-field="partyId"/>
+            <set field="partyEmailCtx.contactMechPurposeTypeId" value="OTHER_EMAIL"/>
+            <call-service service-name="createPartyEmailAddress" in-map-name="partyEmailCtx">
+                <result-to-field result-name="contactMechId" field-name="contactMechId"/>
+            </call-service>  
+        </if-not-empty>                  
+        <field-to-result field-name="partyId"/>
+    </simple-method>
+    
+</simple-methods>        
\ No newline at end of file

Added: ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/humanres/HumanResMapProcs.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/humanres/HumanResMapProcs.xml?rev=652894&view=auto
==============================================================================
--- ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/humanres/HumanResMapProcs.xml (added)
+++ ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/humanres/HumanResMapProcs.xml Fri May  2 13:28:03 2008
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<simple-map-processors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
+    
+    <simple-map-processor name="postalAddressGeneral">
+        <process field="generalAddressLine1"><copy to-field="address1"/></process>
+        <process field="generalAddressLine2"><copy to-field="address2"/></process>
+        <process field="generalCity"><copy to-field="city"/><not-empty><fail-property resource="PartyUiLabels" property="PartyPostalCodeMissing"/></not-empty></process>
+        <process field="generalState"><copy to-field="stateProvinceGeoId"/></process>
+        <process field="generalPostalCode"><copy to-field="postalCode"/><not-empty><fail-property resource="PartyUiLabels" property="PartyPostalCodeMissing"/></not-empty></process>
+        <process field="generalCountry"><copy to-field="countyGeoId"/></process>
+    </simple-map-processor>
+    
+    <simple-map-processor name="workPhoneNumber">
+        <process field="workCountryCode"><copy to-field="countryCode"/></process>
+        <process field="workAreaCode"><copy to-field="areaCode"/></process>
+        <process field="workContactNumber"><copy to-field="contactNumber"/><not-empty><fail-property resource="PartyUiLabels" property="PartyContactNumberMissing"/></not-empty></process>
+        <process field="workExtension"><copy to-field="extension"/></process>
+    </simple-map-processor>
+    
+    <simple-map-processor name="mobileNumber">
+        <process field="mobileCountryCode"><copy to-field="countryCode"/></process>
+        <process field="mobileAreaCode"><copy to-field="areaCode"/></process>
+        <process field="mobileContactNumber"><copy to-field="contactNumber"/></process>
+        <process field="mobileExtension"><copy to-field="extension"/></process>    
+    </simple-map-processor>
+                
+    <simple-map-processor name="otherEmail">
+        <process field="otherEmail">
+            <copy to-field="emailAddress"/>
+            <validate-method method="isEmail"><fail-property resource="PartyUiLabels" property="PartyEmailAddressNotFormattedCorrectly"/></validate-method>
+        </process>
+    </simple-map-processor>
+</simple-map-processors>

Propchange: ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/humanres/HumanResMapProcs.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/humanres/HumanResMapProcs.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/humanres/HumanResMapProcs.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/applications/humanres/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/servicedef/services.xml?rev=652894&r1=652893&r2=652894&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/humanres/servicedef/services.xml Fri May  2 13:28:03 2008
@@ -550,6 +550,36 @@
         <permission-service service-name="humanResManagerPermission" main-action="DELETE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>
     </service>
-</services>
-
-
+    <service name="createEmployee" engine="simple"
+        location="org/ofbiz/humanres/HumanResServices.xml" invoke="createEmployee">
+        <description>Create an Employee its role and contact details</description>
+        <auto-attributes entity-name="Person" mode="IN" optional="true">
+            <exclude field-name="partyId"/>
+        </auto-attributes>
+        <auto-attributes entity-name="PostalAddress" mode="IN" optional="true">
+            <exclude field-name="contactMechId"/>
+        </auto-attributes>
+        <auto-attributes entity-name="TelecomNumber" mode="IN" optional="true">
+            <exclude field-name="contactMechId"/>
+        </auto-attributes>
+        <attribute name="partyId" type="String" mode="OUT"/>
+        <attribute name="postalAddContactMechPurpTypeId" type="String" mode="IN" optional="false"/>
+        <attribute name="emailAddress" type="String" mode="IN" optional="true"/>
+        <attribute name="partyIdFrom" type="String" mode="IN" optional="true"/>
+        <attribute name="generalAddressLine1" type="String" mode="IN" optional="true"/>
+        <attribute name="generalAddressLine2" type="String" mode="IN" optional="true"/>
+        <attribute name="generalCity" type="String" mode="IN" optional="true"/>
+        <attribute name="generalState" type="String" mode="IN" optional="true"/>  
+        <attribute name="generalCountry" type="String" mode="IN" optional="true"/>                                  
+        <attribute name="generalPostalCode" type="String" mode="IN" optional="true"/>
+        <attribute name="workCountryCode" type="String" mode="IN" optional="true"/>
+        <attribute name="workAreaCode" type="String" mode="IN" optional="true"/>
+        <attribute name="workContactNumber" type="String" mode="IN" optional="true"/>
+        <attribute name="workExtension" type="String" mode="IN" optional="true"/>
+        <attribute name="mobileCountryCode" type="String" mode="IN" optional="true"/>        
+        <attribute name="mobileAreaCode" type="String" mode="IN" optional="true"/>        
+        <attribute name="mobileContactNumber" type="String" mode="IN" optional="true"/>        
+        <attribute name="mobileExtension" type="String" mode="IN" optional="true"/>                                
+        <attribute name="otherEmail" type="String" mode="IN" optional="true"/>                                        
+    </service>
+</services>
\ No newline at end of file

Modified: ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml?rev=652894&r1=652893&r2=652894&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml Fri May  2 13:28:03 2008
@@ -21,7 +21,8 @@
 
 <site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd">
-    <include location="component://common/webcommon/WEB-INF/common-controller.xml"/>    
+    <include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
+    <include location="component://party/webapp/partymgr/WEB-INF/controller.xml"/>        
     <description>Human Resources Manager Module Site Configuration File</description>
     <owner>Copyright 2001-2007 The Apache Software Foundation</owner>
     
@@ -507,6 +508,21 @@
         <event type="service" invoke="deleteSkillType"/>
         <response name="success" type="view" value="EditSkillTypes"/>              
     </request-map>
+    <!--====================Employee Requests==================-->
+    <request-map uri="findEmployees">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="FindEmployee"/>              
+    </request-map>
+    <request-map uri="CreateEmployee">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="CreateEmployee"/>              
+    </request-map>
+    <request-map uri="createEmployee">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createEmployee"/>
+        <response name="success" type="request" value="viewprofile"/>
+        <response name="error" type="view" value="CreateEmployee"/>
+    </request-map>    
     <!-- ===================Lookup Request===================== -->
     <request-map uri="LookupPartyName"><security auth="true" https="true"/><response name="success" type="view" value="LookupPartyName"/></request-map>
     <request-map uri="LookupPayment"><security auth="true" https="true"/><response name="success" type="view" value="LookupPayment"/></request-map>    
@@ -563,4 +579,6 @@
     <view-map name="LookupSalaryStep"  type="screen" page="component://humanres/widget/LookupScreens.xml#LookupSalaryStep"/>
     <view-map name="LookupPayGrade"  type="screen" page="component://humanres/widget/LookupScreens.xml#LookupPayGrade"/>
     <view-map name="EditSkillTypes" type="screen" page="component://humanres/widget/PartyAbilityScreens.xml#EditSkillTypes"/>
+    <view-map name="FindEmployee" type="screen" page="component://humanres/widget/EmploymentScreens.xml#FindEmployee"/>
+    <view-map name="CreateEmployee" type="screen" page="component://humanres/widget/EmploymentScreens.xml#CreateEmployee"/>
 </site-conf>

Modified: ofbiz/trunk/applications/humanres/webapp/humanres/includes/appheader.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/webapp/humanres/includes/appheader.ftl?rev=652894&r1=652893&r2=652894&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/webapp/humanres/includes/appheader.ftl (original)
+++ ofbiz/trunk/applications/humanres/webapp/humanres/includes/appheader.ftl Fri May  2 13:28:03 2008
@@ -31,6 +31,7 @@
     <li<#if selected == "EmploymentApp"> class="selected"</#if>><a href="<@ofbizUrl>findEmploymentApps</@ofbizUrl>">${uiLabelMap.HumanResEmploymentApp}</a></li>
     <li<#if selected == "PartySkills"> class="selected"</#if>><a href="<@ofbizUrl>ListPartySkills</@ofbizUrl>">${uiLabelMap.HumanResListPartySkill}</a></li>
     <li<#if selected == "SkillType"> class="selected"</#if>><a href="<@ofbizUrl>findSkillTypes</@ofbizUrl>">${uiLabelMap.HumanResSkillType}</a></li>
+    <li<#if selected == "Employee"> class="selected"</#if>><a href="<@ofbizUrl>findEmployees</@ofbizUrl>">${uiLabelMap.HumanResEmployee}</a></li>
     <#if userLogin?has_content>
       <li class="opposed"><a href="<@ofbizUrl>logout</@ofbizUrl>">${uiLabelMap.CommonLogout}</a></li>
     <#else>

Modified: ofbiz/trunk/applications/humanres/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/CommonScreens.xml?rev=652894&r1=652893&r2=652894&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/CommonScreens.xml Fri May  2 13:28:03 2008
@@ -26,6 +26,8 @@
                 <property-map resource="HumanResUiLabels" map-name="uiLabelMap" global="true"/>                
                 <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
                 <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="WorkEffortUiLabels" map-name="uiLabelMap" global="true"/>
                 <set field="layoutSettings.companyName" from-field="uiLabelMap.HumanResCompanyName" global="true"/>
                 <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.HumanResCompanySubtitle" global="true"/>
                 <!-- layoutSettings.headerImageUrl can be used to specify an application specific logo; if not set,
@@ -180,4 +182,53 @@
             </widgets>
         </section>
     </screen>
-</screens>
+    <screen name="CommonPartyDecorator">
+        <section>
+            <actions>
+                <set field="partyId" from-field="parameters.partyId"/>
+                <entity-one entity-name="Party" value-name="party"/>
+                <entity-one entity-name="Person" value-name="lookupPerson"/>
+                <entity-one entity-name="PartyGroup" value-name="lookupGroup"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                    <if-has-permission permission="PARTYMGR" action="_VIEW"/>
+                            </condition>
+                            <!-- do check for PARTYMGR, _VIEW permission -->
+                            <widgets>
+                                <section>
+                                    <condition><not><if-empty field-name="partyId"/></not></condition>
+                                    <widgets>
+                                        <container style="h1">
+                                            <section>
+                                                <condition>
+                                                    <or>
+                                                        <not><if-empty field-name="lookupPerson"/></not>
+                                                        <not><if-empty field-name="lookupGroup"/></not>
+                                                    </or>
+                                                </condition>
+                                                <widgets>
+                                                    <label style="h1" text="${uiLabelMap.PartyTheProfileOf} ${lookupPerson.personalTitle} ${lookupPerson.firstName} ${lookupPerson.middleName} ${lookupPerson.lastName} ${lookupPerson.suffix} ${lookupGroup.groupName} [${partyId}]"/>
+                                                </widgets>
+                                                <fail-widgets>
+                                                    <label style="h1" text="${uiLabelMap.PartyNewUser}"/>
+                                                </fail-widgets>
+                                            </section>
+                                        </container>
+                                    </widgets>
+                                </section>
+                                <decorator-section-include name="body"/>
+                            </widgets>
+                            <fail-widgets>
+                                <label style="h3">${uiLabelMap.PartyMgrViewPermissionError}</label>
+                            </fail-widgets>
+                        </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+</screens>
\ No newline at end of file

Modified: ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml?rev=652894&r1=652893&r2=652894&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/EmploymentScreens.xml Fri May  2 13:28:03 2008
@@ -525,5 +525,61 @@
                 </decorator-screen>
             </widgets>                              
         </section>
-    </screen>    
+    </screen>
+    <screen name="FindEmployee">
+        <section>                        
+            <actions>
+                <set field="titleProperty" value="${uiLabelMap.CommonFind} ${uiLabelMap.HumanResEmployee}"/>
+            </actions>            
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">                                                                                      
+                        <container style="screenlet">
+                            <container style="screenlet-title-bar">
+                                <container style="h3">
+                                    <label text="${uiLabelMap.CommonFind} ${uiLabelMap.HumanResEmployee}"/>
+                                </container>
+                            </container>
+                            <container style="screenlet-body">
+                                <section>
+                                    <widgets>
+                                        <container>
+                                            <link target="CreateEmployee" text="${uiLabelMap.PartyCreateNewEmployee}" style="buttontext" />
+                                        </container>
+                                    </widgets>
+                                </section>
+                            </container>
+                        </container>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>            
+        </section>
+    </screen>
+    <screen name="CreateEmployee">
+        <section>                        
+            <actions>
+                <set field="titleProperty" value="PartyCreateNewEmployee"/>
+            </actions>            
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">                                                                                      
+                        <container style="screenlet">
+                            <container style="screenlet-title-bar">
+                                <container style="h3">
+                                    <label text="${uiLabelMap.PartyCreateNewEmployee}"/>
+                                </container>
+                            </container>
+                            <container style="screenlet-body">
+                                <section>
+                                    <widgets>
+                                        <include-form name="CreateEmployee" location="component://humanres/widget/forms/EmploymentForms.xml"/>
+                                    </widgets>
+                                </section>
+                            </container>
+                        </container>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>            
+        </section>
+    </screen>
 </screens>
\ No newline at end of file

Modified: ofbiz/trunk/applications/humanres/widget/forms/EmploymentForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/forms/EmploymentForms.xml?rev=652894&r1=652893&r2=652894&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/widget/forms/EmploymentForms.xml (original)
+++ ofbiz/trunk/applications/humanres/widget/forms/EmploymentForms.xml Fri May  2 13:28:03 2008
@@ -356,5 +356,83 @@
         <field name="partyIdTo" title="${uiLabelMap.HumanResPartyIdTo}" use-when="unemploymentClaim==null" ><lookup target-form-name="LookupPartyName"/></field>        
         <field name="submitButton" use-when="unemploymentClaim==null" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>        
         <field name="submitButton" use-when="unemploymentClaim!=null" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>  
-    </form>        
+    </form>
+    <form name="CreateEmployee" type="single" target="createEmployee"
+        header-row-style="header-row" default-table-style="basic-table">
+        <field name="salutation" title="${uiLabelMap.CommonTitle}"><text/></field>
+        <field name="firstName" title="${uiLabelMap.PartyFirstName}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30"/></field>
+        <field name="middleName" title="${uiLabelMap.PartyMiddleInitial}"><text/></field>
+        <field name="lastName" title="${uiLabelMap.PartyLastName}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30"/></field>
+        <field name="EmployedTo" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="PartyRole" key-field-name="partyId" description="${partyId}">
+                    <entity-constraint name="roleTypeId" operator="equals" value="INTERNAL_ORGANIZATIO"/>                    
+                </entity-options>
+                <option key="null" description="-----"/>
+            </drop-down>
+        </field>
+        <field name="fromDate" title="${uiLabelMap.WorkEffortEstimatedStartDate}"><date-time/></field>
+        <field name="permanentAddress" title="${uiLabelMap.OrderAddress}" title-area-style="group-label"><display description=" " also-hidden="false"/></field>
+        <field name="postalAddContactMechPurpTypeId"><hidden value="PRIMARY_LOCATION"/></field>
+        <field name="address1" title="${uiLabelMap.CommonAddress1}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30" maxlength="60"/></field>
+        <field name="address2" title="${uiLabelMap.CommonAddress2}"><text size="30" maxlength="60"/></field>
+        <field name="city" title="${uiLabelMap.CommonCity}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30" maxlength="60"/></field>
+        <field name="state" title="${uiLabelMap.CommonState}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="Geo" key-field-name="geoId" description="${geoId} - ${geoName}">
+                    <entity-constraint name="geoTypeId" operator="in" value="STATE,PROVINCE"/>
+                    <entity-order-by field-name="geoId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="postalCode" title="${uiLabelMap.CommonZipPostalCode}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="10" maxlength="30"/></field>
+        <field name="country" title="${uiLabelMap.CommonCountry}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required">
+            <drop-down allow-empty="false" no-current-selected-key="${defaultCountryGeoId}">
+                <entity-options entity-name="Geo" key-field-name="geoId" description="${geoId}: ${geoName}">
+                    <entity-constraint name="geoTypeId" value="COUNTRY"/>
+                    <entity-order-by field-name="geoId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="generalAddress" title="${uiLabelMap.PartyGeneralCorrespondenceAddress}" title-area-style="group-label"><display description=" " also-hidden="false"/></field>
+        <field name="generalAddressLine1" title="${uiLabelMap.CommonAddress1}"><text size="30" maxlength="60"/></field>
+        <field name="generalAddressLine2" title="${uiLabelMap.CommonAddress2}"><text size="30" maxlength="60"/></field>        
+        <field name="generalCity" title="${uiLabelMap.CommonCity}"><text size="30" maxlength="60"/></field>
+        <field name="generalState" title="${uiLabelMap.CommonState}">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="Geo" key-field-name="geoId" description="${geoId} - ${geoName}">
+                    <entity-constraint name="geoTypeId" operator="in" value="STATE,PROVINCE"/>
+                    <entity-order-by field-name="geoId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="generalPostalCode" title="${uiLabelMap.CommonZipPostalCode}"><text size="10" maxlength="30"/></field>
+        <field name="generalCountry" title="${uiLabelMap.CommonCountry}">
+            <drop-down allow-empty="false" no-current-selected-key="${defaultCountryGeoId}">
+                <entity-options entity-name="Geo" key-field-name="geoId" description="${geoId}: ${geoName}">
+                    <entity-constraint name="geoTypeId" value="COUNTRY"/>
+                    <entity-order-by field-name="geoId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="homePhone" title="${uiLabelMap.PartyHomePhone}" title-area-style="group-label"><display/></field>
+        <field name="countryCode" title="${uiLabelMap.PartyCountryCode}"><text size="4" maxlength="10"/></field>
+        <field name="areaCode" title="${uiLabelMap.PartyAreaCode}"><text size="4" maxlength="10"/></field>
+        <field name="contactNumber" title="${uiLabelMap.PartyPhoneNumber}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="15" maxlength="15"/></field>
+        <field name="extension" title="${uiLabelMap.PartyContactExt}"><text size="6" maxlength="10"/></field>
+        <field name="workPhone" title="${uiLabelMap.PartyContactWorkPhoneNumber}" title-area-style="group-label"><display description=" " also-hidden="false"/></field>
+        <field name="workCountryCode" title="${uiLabelMap.PartyCountryCode}"><text size="4" maxlength="10"/></field>
+        <field name="workAreaCode" title="${uiLabelMap.PartyAreaCode}"><text size="4" maxlength="10"/></field>
+        <field name="workContactNumber" title="${uiLabelMap.PartyPhoneNumber}"><text size="15" maxlength="15"/></field>
+        <field name="workExtension" title="${uiLabelMap.PartyContactExt}"><text size="6" maxlength="10"/></field>
+        <field name="mobilePhone" title="${uiLabelMap.PartyContactMobilePhoneNumber}" title-area-style="group-label"><display description=" " also-hidden="false"/></field>
+        <field name="mobileCountryCode" title="${uiLabelMap.PartyCountryCode}"><text size="4" maxlength="10"/></field>
+        <field name="mobileAreaCode" title="${uiLabelMap.PartyAreaCode}"><text size="4" maxlength="10"/></field>
+        <field name="mobileContactNumber" title="${uiLabelMap.PartyPhoneNumber}"><text size="15" maxlength="15"/></field>
+        <field name="mobileExtension" title="${uiLabelMap.PartyContactExt}"><text size="6" maxlength="10"/></field>
+        <field name="EmailAddress" title="${uiLabelMap.PartyEmailAddress}" title-area-style="group-label"><display description=" " also-hidden="false"/></field>
+        <field name="emailAddress" title="${uiLabelMap.PartyEmailAddress}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="60" maxlength="250"/></field>
+        <field name="otherEmail" title="${uiLabelMap.PartyOtherEmailAddress}"><text size="60" maxlength="250"/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="buttontext"><submit button-type="text-link"/></field>
+    </form>    
 </forms>
\ No newline at end of file