← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4811: Open the date pickers for future dates (Summary Report).

 

------------------------------------------------------------
revno: 4811
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-10-04 09:39:49 +0700
message:
  Open the date pickers for future dates (Summary Report).
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/ValidateReportParametersAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportSelect.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/ValidateReportParametersAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/ValidateReportParametersAction.java	2011-07-15 08:07:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/ValidateReportParametersAction.java	2011-10-04 02:39:49 +0000
@@ -27,8 +27,6 @@
 
 package org.hisp.dhis.caseentry.action.report;
 
-import java.util.Date;
-
 import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.i18n.I18nFormat;
 
@@ -95,65 +93,6 @@
     public String execute()
         throws Exception
     {
-        if ( startDate == null )
-        {
-            message = i18n.getString( "please_choose_a_valid_start_date" );
-
-            return INPUT;
-        }
-        else
-        {
-            startDate = startDate.trim();
-
-            if ( startDate.length() != 0 )
-            {
-                Date start = format.parseDate( startDate );
-
-                if ( start == null || start.after( new Date() ) )
-                {
-                    message = i18n.getString( "please_choose_a_valid_start_date" );
-
-                    return INPUT;
-                }
-            }
-            else
-            {
-                message = i18n.getString( "please_choose_a_valid_start_date" );
-
-                return INPUT;
-            }
-        }
-
-        if ( endDate == null )
-        {
-            message = i18n.getString( "please_choose_a_valid_end_date" );
-
-            return INPUT;
-        }
-
-        else
-        {
-            endDate = endDate.trim();
-
-            if ( endDate.length() != 0 )
-            {
-                Date end = format.parseDate( endDate );
-
-                if ( end == null || end.after( new Date() ) )
-                {
-                    message = i18n.getString( "please_choose_a_valid_end_date" );
-
-                    return INPUT;
-                }
-            }
-            else
-            {
-                message = i18n.getString( "please_choose_a_valid_end_date" );
-
-                return INPUT;
-            }
-        }
-
         if ( format.parseDate( endDate ).before( format.parseDate( startDate ) ) )
         {
             message = i18n.getString( "please_choose_a_valid_start_end_date" );

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportSelect.vm	2011-09-29 06:14:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportSelect.vm	2011-10-04 02:39:49 +0000
@@ -27,7 +27,7 @@
         <td>
             <input type="text" id="startDate" name="startDate" disabled class="{validate:{required:true}}" />
 			<script type="text/javascript">
-				datePickerValid('startDate');
+				datePicker('startDate');
             </script>  	
         </td>
     </tr>
@@ -37,7 +37,7 @@
         <td>
             <input type="text" id="endDate" name="endDate" disabled class="{validate:{required:true}}" />
             <script type="text/javascript">
-				datePickerValid('endDate');
+				datePicker('endDate');
             </script> 				
         </td>      
     </tr>