Author: jleroux
Date: Fri Jul 13 07:09:43 2012
New Revision: 1361056
URL: http://svn.apache.org/viewvc?rev=1361056&view=rev
Log:
A patch from Tom Burns for "HR Public Holiday Accepts Blank in Required Field
"https://issues.apache.org/jira/browse/OFBIZ-4965
To Reproduce:
1. Navigate to HR > Global HR Settings > Public Holiday
2. Enter a From Date
3. Click Submit
Expected: Alert like "Required field Holiday Name missing"
Actual: New record created without required Holiday Name
Modified:
ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml
ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml
Modified:
ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml?rev=1361056&r1=1361055&r2=1361056&view=diff
==============================================================================
---
ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml
(original)
+++
ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml
Fri Jul 13 07:09:43 2012
@@ -55,6 +55,12 @@
<!-- Public Holiday -->
<simple-method method-name="createPublicHoliday" short-description="Create
Public Holiday">
+ <if-empty field="parameters.workEffortName">
+ <add-error>
+ <fail-message message="The Holiday Name is missing."/>
+ </add-error>
+ <check-errors/>
+ </if-empty>
<if-empty field="parameters.estimatedStartDate">
<add-error>
<fail-message message="The FromDate is missing"/>
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=1361056&r1=1361055&r2=1361056&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml
(original)
+++ ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml
Fri Jul 13 07:09:43 2012
@@ -1082,7 +1082,7 @@ under the License.
<security https="true" auth="true"/>
<event type="simple"
path="component://humanres/script/org/ofbiz/humanres/HumanResEvents.xml"
invoke="createPublicHoliday"/>
<response name="success" type="request-redirect-noparam"
value="PublicHoliday"/>
- <response name="error" type="view-last"/>
+ <response name="error" type="view" value="PublicHoliday"/>
</request-map>
<request-map uri="updatePublicHoliday">
<security https="true" auth="true"/>