dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #12263
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3731: Removed message "Please enter a valid 9 digit code" for orgunit in add new beneficiary.
------------------------------------------------------------
revno: 3731
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-05-25 09:34:58 +0700
message:
Removed message "Please enter a valid 9 digit code" for orgunit in add new beneficiary.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ShowAddPatientFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.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-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ShowAddPatientFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ShowAddPatientFormAction.java 2011-03-20 17:57:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ShowAddPatientFormAction.java 2011-05-25 02:34:58 +0000
@@ -94,17 +94,13 @@
private OrganisationUnit organisationUnit;
private String year;
-
- private boolean showMsg;
-
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
public String execute()
{
-
- showMsg = false;
identifierTypes = patientIdentifierTypeService.getAllPatientIdentifierTypes();
noGroupAttributes = patientAttributeService.getPatientAttributesNotGroup();
@@ -113,18 +109,11 @@
organisationUnit = selectionManager.getSelectedOrganisationUnit();
- for ( PatientIdentifierType identifierType : identifierTypes )
- {
- if ( identifierType.getFormat() != null && identifierType.getFormat().equals( "State Format" )
- && identifierType.isMandatory() == true )
- {
- if ( organisationUnit.getCode() == null || organisationUnit.getCode().length() < 9 )
- showMsg = true;
- }
- }
-
+
SimpleDateFormat dataFormat = new SimpleDateFormat( "y" );
+
year = dataFormat.format( new Date() );
+
return SUCCESS;
}
@@ -156,9 +145,4 @@
{
return year;
}
-
- public boolean isShowMsg()
- {
- return showMsg;
- }
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm 2011-05-13 09:11:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm 2011-05-25 02:34:58 +0000
@@ -8,10 +8,6 @@
#end
#end
-#if($showMsg == "true" )
- <table><tr><td>$i18n.getString( "oucode_must_be_valid" )</td></tr><table>
-#else
-
<script>
jQuery(document).ready( function(){
@@ -256,7 +252,6 @@
<input type="submit" value="$i18n.getString( 'add' )" style="width:10em"/>
</p>
</form>
-#end
<div id="hiddenModalContent" style="display:none">
<style>