dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #08009
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2381: not insert today into close date when add/update organisation unit
------------------------------------------------------------
revno: 2381
committer: Tri Tran Thanh <Tri Tran Thanh@compaq>
branch nick: trunk
timestamp: Fri 2010-10-15 20:15:20 +0700
message:
not insert today into close date when add/update organisation unit
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.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-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2010-10-14 08:14:12 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2010-10-15 13:15:20 +0000
@@ -807,7 +807,7 @@
* Create jQuery datepicker for input text with id * *
* @param id the id of input filed which you want enter date *
*/
-function datePickerValid( id )
+function datePickerValid( id, today )
{
jQuery("#" + id).datepicker(
{
@@ -822,9 +822,10 @@
maxDate: '+0d +0w',
constrainInput: true
});
-
- s = jQuery("#" + id );
- if( s.val()=='' ) s.val( getCurrentDate() );
+ if( today ){
+ s = jQuery("#" + id );
+ if( s.val()=='' ) s.val( getCurrentDate() );
+ }
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm 2010-10-04 10:59:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm 2010-10-15 13:15:20 +0000
@@ -5,7 +5,7 @@
checkValueIsExist( "name", "validateOrganisationUnit.action");
checkValueIsExist( "code", "validateOrganisationUnit.action");
- datePicker( 'openingDate' );
+ datePickerValid( 'openingDate', false );
});
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm 2010-10-04 10:59:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm 2010-10-15 13:15:20 +0000
@@ -10,7 +10,7 @@
id: $organisationUnit.id
});
- datePickerInRange( 'openingDate', 'closedDate', true, false );
+ datePickerInRange( 'openingDate', 'closedDate', false, false );
@@ -50,7 +50,7 @@
<tr #if( $numberOfChildren != 0 ) style="display:none" #end>
<td><label for="closedDate">$i18n.getString( "closed_date" ) ($i18n.getString( "format.date.label" ))</label></td>
- <td><input type="text" id="closedDate" name="closedDate" value="$!format.formatDate( $organisationUnit.closedDate )" class="{validate:{greaterDate:'#openingDate'}}" style="width:20em"/></td>
+ <td><input type="text" id="closedDate" name="closedDate" value="$!format.formatDate( $organisationUnit.closedDate )" style="width:20em"/></td>
</tr>
<tr>
<td><label for="active">$i18n.getString( "registers_date" )</label></td>