dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #07670
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2226: Fix bug: Cannot run Underage function into Add New Beneficiary function
------------------------------------------------------------
revno: 2226
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Fri 2010-09-24 20:23:08 +0700
message:
Fix bug: Cannot run Underage function into Add New Beneficiary function
modified:
dhis-2/dhis-services/dhis-service-options/src/main/resources/help_content.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPersonAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml
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/javascript/underage.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/underAgeForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.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-services/dhis-service-options/src/main/resources/help_content.xml'
--- dhis-2/dhis-services/dhis-service-options/src/main/resources/help_content.xml 2010-09-13 08:15:46 +0000
+++ dhis-2/dhis-services/dhis-service-options/src/main/resources/help_content.xml 2010-09-24 13:23:08 +0000
@@ -560,10 +560,6 @@
<para>The data maintenance module has five options, each described below. </para>
<itemizedlist>
<listitem>
- <para>Clear hierarchy history</para>
- <para>DHIS 2 maintains an audit trail of changes to the organisation unit hierarchy for aggregation purposes. This function clears the hierarchy history.</para>
- </listitem>
- <listitem>
<para>Clear data mart (aggregated datavalues)</para>
<para>The data mart is where DHIS 2 stores aggregated data produced during the export to data mart process. This function clears the database table which contains aggregated data element values.</para>
</listitem>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPersonAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPersonAction.java 2010-03-05 06:24:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPersonAction.java 2010-09-24 13:23:08 +0000
@@ -82,9 +82,6 @@
{
patients = patientService.searchPatient( identifierTypeId, attributeId, searchValue );
-
-
-
if( patients != null && patients.size() > 0 )
{
for ( Patient p : patients )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2010-09-24 09:50:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2010-09-24 13:23:08 +0000
@@ -393,4 +393,6 @@
add_new_relationship_for = Add new relationship for
sort_by = Sort by
other_details = Other Details
-patient_attribute_details = Patient attribute details
\ No newline at end of file
+patient_attribute_details = Patient attribute details
+search_result = Search result
+criteria = Criteria
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2010-09-23 04:50:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2010-09-24 13:23:08 +0000
@@ -185,7 +185,7 @@
<param name="menuTreeHeight">285</param>
<param name="javascripts">
../dhis-web-commons/ouwt/ouwt.js
- ,../dhis-web-commons/util/date.js
+ ,../dhis-web-commons/javascripts/date.js
,javascript/jquery/thickbox/thickbox-compressed.js
,javascript/relationshipPatient.js
</param>
@@ -408,7 +408,7 @@
<param name="menuTreeHeight">285</param>
<param name="javascripts">
../dhis-web-commons/ouwt/ouwt.js
- ,../dhis-web-commons/util/date.js
+ ,../dhis-web-commons/javascripts/date.js
,javascript/jquery/thickbox/thickbox-compressed.js
,javascript/patient.js
</param>
@@ -426,7 +426,7 @@
<param name="menuTreeHeight">285</param>
<param name="javascripts">
../dhis-web-commons/ouwt/ouwt.js
- ,../dhis-web-commons/util/date.js
+ ,../dhis-web-commons/javascripts/date.js
,javascript/jquery/thickbox/thickbox-compressed.js
,javascript/jquery/cluetip/jquery.cluetip.min.js
,javascript/patient.js
@@ -458,11 +458,15 @@
<result name="success" type="velocity">/popup.vm</result>
<param name="page">/dhis-web-maintenance-patient/underAgeForm.vm</param>
<param name="javascripts">
- ../dhis-web-commons/util/jquery-ui.js
- ,../dhis-web-commons/util/date.js
- ,javascript/underage.js
+ ../dhis-web-commons/javascripts/jQuery/ui/jquery-ui.js,
+ ../dhis-web-commons/javascripts/date.js,
+ ../dhis-web-commons/calendar/calendar.js,
+ ../dhis-web-commons/calendar/calendar-lang.js,
+ ../dhis-web-commons/calendar/calendar-setup.js,
+ ../dhis-web-commons/javascripts/jQuery/jquery.metadata.js,
+ javascript/underage.js
</param>
- <param name="stylesheets">../dhis-web-commons/util/css/redmond/jquery-ui.css</param>
+ <param name="stylesheets">../dhis-web-commons/javascripts/jQuery/ui/css/redmond/jquery-ui.css</param>
</action>
<action name="searchPerson" class="org.hisp.dhis.patient.action.patient.SearchPersonAction">
@@ -485,7 +489,10 @@
<param name="menu">/dhis-web-maintenance-patient/menuWithTree.vm</param>
<param name="menuTreeHeight">321</param>
<param name="page">/dhis-web-maintenance-patient/programEnrollmentSelectForm.vm</param>
- <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/util/date.js,javascript/patient.js</param>
+ <param name="javascripts">
+ ../dhis-web-commons/ouwt/ouwt.js,
+ ../dhis-web-commons/javascripts/date.js,
+ javascript/patient.js</param>
<param name="requiredAuthorities">F_PATIENT_UPDATE</param>
</action>
@@ -496,7 +503,10 @@
<param name="menu">/dhis-web-maintenance-patient/menuWithTree.vm</param>
<param name="menuTreeHeight">321</param>
<param name="page">/dhis-web-maintenance-patient/programEnrollmentForm.vm</param>
- <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/util/date.js,javascript/patient.js</param>
+ <param name="javascripts">
+ ../dhis-web-commons/ouwt/ouwt.js,
+ ../dhis-web-commons/javascripts/date.js,
+ javascript/patient.js</param>
<param name="requiredAuthorities">F_PATIENT_UPDATE</param>
</action>
@@ -519,7 +529,10 @@
<param name="menuTreeHeight">321</param>
<param name="page">/dhis-web-maintenance-patient/programEnrollmentForm.vm</param>
<!--<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/patient.js</param>-->
- <param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/util/date.js,javascript/patient.js</param>
+ <param name="javascripts">
+ ../dhis-web-commons/ouwt/ouwt.js,
+ ../dhis-web-commons/javascripts/date.js,
+ javascript/patient.js</param>
</action>
<action name="removeEnrollment"
@@ -756,7 +769,7 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-patient/viewDataEntryForm.vm</param>
<param name="javascripts">
- ../dhis-web-commons/util/jquery-ui.js
+ ../dhis-web-commons/javascripts/jquery-ui.js
,javascript/dataEntryForm.js
,javascript/FCK/fckeditor.js
,javascript/hashtable.js
=== 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 2010-09-24 09:50:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm 2010-09-24 13:23:08 +0000
@@ -40,15 +40,15 @@
</tr>
<tr>
<td><label for="firstName">$i18n.getString( "first_name" )</label></td>
- <td class="input-column" ><input type="text" id="firstName" name="firstName" maxlength="30" class="required_group {validate:{required_group:true,rangelength:[2,30], lettersonly: true}}" ></td>
+ <td class="input-column" ><input type="text" id="firstName" name="firstName" maxlength="30" class="required_group {validate:{required_group:true,rangelength:[2,30], letterswithbasicpunc: true}}" ></td>
</tr>
<tr>
<td><label for="middleName">$i18n.getString( "middle_name" ) </label></td>
- <td class="input-column"> <input type="text" id="middleName" name="middleName" maxlength="30" class="required_group {validate:{required_group:true,rangelength:[2,30], lettersonly: true}}"></td>
+ <td class="input-column"> <input type="text" id="middleName" name="middleName" maxlength="30" class="required_group {validate:{required_group:true,rangelength:[2,30], letterswithbasicpunc: true}}"></td>
</tr>
<tr>
<td><label for="lastName">$i18n.getString( "last_name" )</label></td>
- <td class="input-column"><input type="text" id="lastName" name="lastName" maxlength="30" class="required_group {validate:{required_group:true,rangelength:[2,30], lettersonly: true}}"></td>
+ <td class="input-column"><input type="text" id="lastName" name="lastName" maxlength="30" class="required_group {validate:{required_group:true,rangelength:[2,30], letterswithbasicpunc: true}}"></td>
</tr>
<tr><td> </td></tr>
<tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/underage.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/underage.js 2010-03-08 06:24:52 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/underage.js 2010-09-24 13:23:08 +0000
@@ -1,62 +1,15 @@
-jQuery(document).ready(function()
-{
- jQuery("#tabs").tabs();
-
- jQuery("#searchForm").validate({
- meta:"validate"
- ,errorElement:"td"
- ,submitHandler: function(form)
- {
- searchPerson();
- }
- ,rules : {
- relationshipTypeId :"required"
- ,searchType :"required"
- ,searchValue :"required"
- }
- });
-
- jQuery("#addRepresentativeForm").validate({
- meta:"validate"
- ,errorElement:"td"
- ,submitHandler: function(form)
- {
- validateAddRepresentative();
- }
- ,rules : {
- birthDate :{required:true,dateISO:true,datelessthanequaltoday:true}
- }
- });
-
- jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
-
- // Esc key for jQuery thickbox
- // jQuery thickbox already has this event
- // but somehow it's over written by jQuery tabs plugin
- document.onkeydown = function(e){
- if (e == null) { // ie
- keycode = event.keyCode;
- } else { // mozilla
- keycode = e.which;
- }
- if(keycode == 27){ // close
- window.parent.tb_remove();
- }
- }
-});
-
-
//-----------------------------------------------------------------------------
//Add Patient
//-----------------------------------------------------------------------------
function validateAddRepresentative()
{
+ var relationshipTypeId = getFieldValue("addRepresentativeForm select[id=relationshipTypeId]");
- var relationshipTypeId = jQuery("#relationshipTypeId").val();
if( isBlank( relationshipTypeId ))
{
alert(i18n_please_select_relationshipType);
+ return;
}
var params =
@@ -251,35 +204,35 @@
var type = jQuery(this_).val();
if( "identifier" == type )
{
- jQuery("#rowIdentifier").show().find("#identifierTypeId").rules("add",{"required":true});
- jQuery("#rowAttribute").hide().find("#attributeId").rules("remove","required");
+ jQuery("#rowIdentifier").show().find("#identifierTypeId").addClass('required:true');
+ jQuery("#rowAttribute").hide().find("#attributeId").removeClass("required");
jQuery("#searchValue").val("");
}
else if( "attribute" == type )
{
- jQuery("#rowIdentifier").hide().find("#identifierTypeId").rules("remove","required");
- jQuery("#rowAttribute").show().find("#attributeId").rules("add",{"required":true});
+ jQuery("#rowIdentifier").hide().find("#identifierTypeId").removeClass("required");
+ jQuery("#rowAttribute").show().find("#attributeId").addClass("required:true");
jQuery("#searchValue").val("");
}
else if( "name" == type || "" == type )
{
- jQuery("#rowIdentifier").hide().find("#identifierTypeId").rules("remove","required");
- jQuery("#rowAttribute").hide().find("#attributeId").rules("remove","required");
+ jQuery("#rowIdentifier").hide().find("#identifierTypeId").removeClass("required");
+ jQuery("#rowAttribute").hide().find("#attributeId").removeClass("required");
jQuery("#searchValue").val("");
}
}
function ageOnchange()
{
- jQuery("#birthDate").val("").rules("remove","required");
- jQuery("#age").rules("add",{required:true});
+ jQuery("#birthDate").val("").removeClass("required");
+ jQuery("#age").addClass('required:true');
}
function bdOnchange()
{
- jQuery("#age").val("").rules("remove","required");
- jQuery("#birthDate").rules("add",{required:true});
+ jQuery("#age").val("").removeClass("required");
+ jQuery("#birthDate").addClass('required:true');
}
function isBlank(text)
{
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/underAgeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/underAgeForm.vm 2010-03-05 06:24:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/underAgeForm.vm 2010-09-24 13:23:08 +0000
@@ -1,3 +1,53 @@
+<script>
+jQuery(document).ready(function()
+{
+ jQuery("#tabs").tabs();
+
+ jQuery("#searchForm").validate({
+ meta:"validate"
+ ,errorElement:"td"
+ ,submitHandler: function(form)
+ {
+ searchPerson();
+ }
+ ,rules : {
+ relationshipTypeId :"required"
+ ,searchType :"required"
+ ,searchValue :"required"
+ }
+ });
+
+ jQuery("#addRepresentativeForm").validate({
+ meta:"validate"
+ ,errorElement:"td"
+ ,submitHandler: function(form)
+ {
+ validateAddRepresentative();
+ }
+ ,rules : {
+ birthDate :{required:true,dateISO:true,datelessthanequaltoday:true}
+ }
+ });
+
+ jQuery.validator.loadLocaled( jQuery("#curLocaleCode").val() );
+
+ // Esc key for jQuery thickbox
+ // jQuery thickbox already has this event
+ // but somehow it's over written by jQuery tabs plugin
+ document.onkeydown = function(e){
+ if (e == null) { // ie
+ keycode = event.keyCode;
+ } else { // mozilla
+ keycode = e.which;
+ }
+ if(keycode == 27){ // close
+ window.parent.tb_remove();
+ }
+ }
+});
+
+</script>
+
<style>
.ui-helper-reset{font-size: 0.8em}
div#listPatients {font-size: 0.8em}
@@ -21,7 +71,7 @@
<tr>
<td >$i18n.getString("relationship_type")</td>
<td >
- <select name="relationshipTypeId" id="relationshipTypeId" >
+ <select name="relationshipTypeId" id="relationshipTypeId">
<option value="">[$i18n.getString( "please_select" )]</option>
#foreach ($relationship in $relationshipTypes)
<option value="$relationship.id">$relationship.aIsToB</option>
@@ -32,7 +82,7 @@
<tr>
<td>$i18n.getString("search_by")</td>
<td>
- <select id="searchType" name="searchType" onclick="toggleSearchType(this)" >
+ <select id="searchType" name="searchType" onclick="toggleSearchType(this)">
<option value="">[$i18n.getString( "please_select" )]</option>
<option value="identifier">$i18n.getString("identifier")</option>
<option value="attribute">$i18n.getString("attribute")</option>
@@ -66,10 +116,10 @@
<tr><td colspan="2"></td></tr>
<tr>
<td>$i18n.getString("search_value")</td>
- <td><input type="text" name="searchValue" id="searchValue" /></td>
+ <td><input type="text" name="searchValue" id="searchValue"/></td>
</tr>
<tr>
- <td colspan="2"><input type="submit" value="$i18n.getString('search')" /></td>
+ <td colspan="2"><input type="button" value="$i18n.getString('search')" onclick="searchPerson();"/></td>
</tr>
</table>
</form>
@@ -173,7 +223,7 @@
#end
<tr><td colspan="2"> </td></tr>
<tr>
- <td colspan="2"><input type="submit" value="$i18n.getString( "add" )" style="width:10em"></td>
+ <td colspan="2"><input type="button" value="$i18n.getString( "add" )" style="width:10em" onclick="validateAddRepresentative()"></td>
</tr>
</table>
</form>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm 2010-09-24 09:50:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientForm.vm 2010-09-24 13:23:08 +0000
@@ -36,15 +36,15 @@
</tr>
<tr>
<td><label for="firstName">$i18n.getString( "first_name" )</label></td>
- <td><input type="text" id="firstName" name="firstName" value="$encoder.htmlEncode( $patient.firstName )" style="width:30em" class="required_group {validate:{required_group:true,rangelength:[2,30], lettersonly: true}}"></td>
+ <td><input type="text" id="firstName" name="firstName" value="$encoder.htmlEncode( $patient.firstName )" style="width:30em" class="required_group {validate:{required_group:true,rangelength:[2,30], letterswithbasicpunc: true}}"></td>
</tr>
<tr>
<td><label for="middleName">$i18n.getString( "middle_name" )</label></td>
- <td><input type="text" id="middleName" name="middleName" value="$encoder.htmlEncode( $patient.middleName )" style="width:30em" class="required_group {validate:{required_group:true,rangelength:[2,30], lettersonly: true}}"></td>
+ <td><input type="text" id="middleName" name="middleName" value="$encoder.htmlEncode( $patient.middleName )" style="width:30em" class="required_group {validate:{required_group:true,rangelength:[2,30], letterswithbasicpunc: true}}"></td>
</tr>
<tr>
<td><label for="lastName">$i18n.getString( "last_name" )</label></td>
- <td><input type="text" id="lastName" name="lastName" value="$encoder.htmlEncode( $patient.lastName )" style="width:30em" class="required_group {validate:{required_group:true,rangelength:[2,30], lettersonly: true}}"></td>
+ <td><input type="text" id="lastName" name="lastName" value="$encoder.htmlEncode( $patient.lastName )" style="width:30em" class="required_group {validate:{required_group:true,rangelength:[2,30], letterswithbasicpunc: true}}"></td>
</tr>
<tr><td> </td></tr>
<tr>