dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23358
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11365: Remove disableRegistrationFields property from Program object.
------------------------------------------------------------
revno: 11365
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-07-09 10:26:26 +0700
message:
Remove disableRegistrationFields property from Program object.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addPatientForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewPatientRegistationForm.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-api/src/main/java/org/hisp/dhis/program/Program.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2013-05-17 03:29:07 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/Program.java 2013-07-09 03:26:26 +0000
@@ -121,8 +121,6 @@
private Set<PatientReminder> patientReminders = new HashSet<PatientReminder>();
- private Boolean disableRegistrationFields = false;
-
/**
* All OrganisationUnitGroup that register data with this program.
*/
@@ -520,19 +518,7 @@
{
this.patientReminders = patientReminders;
}
-
- @JsonProperty
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
- public Boolean getDisableRegistrationFields()
- {
- return disableRegistrationFields;
- }
-
- public void setDisableRegistrationFields( Boolean disableRegistrationFields )
- {
- this.disableRegistrationFields = disableRegistrationFields;
- }
-
+
@JsonProperty
@JsonSerialize( contentAs = BaseIdentifiableObject.class )
@JacksonXmlElementWrapper( localName = "organisationUnitGroups", namespace = DxfNamespaces.DXF_2_0 )
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2013-07-04 06:37:30 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2013-07-09 03:26:26 +0000
@@ -209,7 +209,7 @@
updateProgramInstanceStatus();
- executeSql( "UPDATE program SET disableRegistrationFields=false where disableRegistrationFields is null" );
+ executeSql( "ALTER TABLE program DROP COLUMN disableRegistrationFields" );
executeSql( "ALTER TABLE program ALTER COLUMN dateofincidentdescription DROP NOT NULL");
executeSql( "ALTER TABLE patient ALTER COLUMN birthdate DROP NOT NULL");
executeSql( "ALTER TABLE patient ALTER COLUMN gender DROP NOT NULL");
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml 2013-05-15 09:14:57 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml 2013-07-09 03:26:26 +0000
@@ -81,8 +81,6 @@
<one-to-many class="org.hisp.dhis.patient.PatientReminder" />
</set>
- <property name="disableRegistrationFields" />
-
<set name="organisationUnitGroups" table="orgunitgroupprograms">
<key column="programid" />
<many-to-many class="org.hisp.dhis.organisationunit.OrganisationUnitGroup" column="orgunitgroupid"/>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2013-07-08 05:59:46 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2013-07-09 03:26:26 +0000
@@ -661,4 +661,5 @@
message_is_sent = Message is sent.
enter_age_in_years = Enter age in years...
send_to = Send to
-table_layout = Layout
\ No newline at end of file
+table_layout = Layout
+is_hidden = Is hidden
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addPatientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addPatientForm.vm 2013-04-18 06:45:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addPatientForm.vm 2013-07-09 03:26:26 +0000
@@ -10,7 +10,7 @@
,errorElement:"span"
,submitHandler: function(form)
{
- validateAddPatient(isContinue, '$!program.disableRegistrationFields');
+ validateAddPatient(isContinue);
}
,beforeValidateHandler: function(form)
{
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2013-05-28 07:32:37 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2013-07-09 03:26:26 +0000
@@ -124,25 +124,18 @@
}
-function validateAddPatient( isContinue, disableRegistrationFields )
+function validateAddPatient( isContinue )
{
- if( disableRegistrationFields=='' || disableRegistrationFields=='false' )
- {
- $("#patientForm :input").attr("disabled", true);
- $("#patientForm").find("select").attr("disabled", true);
- $.ajax({
- type: "POST",
- url: 'validatePatient.action',
- data: getParamsForDiv('patientForm'),
- success: function(data){
- addValidationCompleted(data,isContinue);
- }
- });
- }
- else
- {
- addPatient( isContinue );
- }
+ $("#patientForm :input").attr("disabled", true);
+ $("#patientForm").find("select").attr("disabled", true);
+ $.ajax({
+ type: "POST",
+ url: 'validatePatient.action',
+ data: getParamsForDiv('patientForm'),
+ success: function(data){
+ addValidationCompleted(data,isContinue);
+ }
+ });
}
function addValidationCompleted( data, isContinue )
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm 2013-07-03 15:40:29 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm 2013-07-09 03:26:26 +0000
@@ -12,9 +12,6 @@
#end
#end
-#if($!program && $program.disableRegistrationFields )
-
-#else
<tr id='registrationDateTR'>
<td class='text-column'><label for="registration_date">$i18n.getString( "registration_date" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td class="input-column" colspan='2'>
@@ -123,8 +120,6 @@
<tr><td> </td></tr>
-#end
-
#if( $identifierTypes.size() > 0)
<!--IDENTIFIERS -->
<tr><th colspan="2" class="heading-column">$i18n.getString("patient_identifiers")</th></tr>
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm 2013-05-15 09:14:57 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm 2013-07-09 03:26:26 +0000
@@ -16,7 +16,6 @@
"blockEntryForm": "$!program.blockEntryForm",
"onlyEnrollOnce": "$!program.onlyEnrollOnce",
"remindCompleted": "$!program.remindCompleted",
- "disableRegistrationFields": "$!program.disableRegistrationFields",
"displayOnAllOrgunit": "$!program.displayOnAllOrgunit"
}
}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java 2013-07-05 07:05:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java 2013-07-09 03:26:26 +0000
@@ -235,13 +235,6 @@
this.sendTo = sendTo;
}
- private Boolean disableRegistrationFields;
-
- public void setDisableRegistrationFields( Boolean disableRegistrationFields )
- {
- this.disableRegistrationFields = disableRegistrationFields;
- }
-
private Boolean displayOnAllOrgunit;
public void setDisplayOnAllOrgunit( Boolean displayOnAllOrgunit )
@@ -263,7 +256,6 @@
blockEntryForm = (blockEntryForm == null) ? false : blockEntryForm;
onlyEnrollOnce = (onlyEnrollOnce == null) ? false : onlyEnrollOnce;
remindCompleted = (remindCompleted == null) ? false : remindCompleted;
- disableRegistrationFields = (disableRegistrationFields == null) ? false : disableRegistrationFields;
displayOnAllOrgunit = (displayOnAllOrgunit == null) ? false : displayOnAllOrgunit;
Program program = new Program();
@@ -279,7 +271,6 @@
program.setBlockEntryForm( blockEntryForm );
program.setOnlyEnrollOnce( onlyEnrollOnce );
program.setRemindCompleted( remindCompleted );
- program.setDisableRegistrationFields( disableRegistrationFields );
program.setDisplayOnAllOrgunit( displayOnAllOrgunit );
if ( type == Program.MULTIPLE_EVENTS_WITH_REGISTRATION )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java 2013-07-02 14:26:44 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java 2013-07-09 03:26:26 +0000
@@ -224,13 +224,6 @@
this.sendTo = sendTo;
}
- private Boolean disableRegistrationFields;
-
- public void setDisableRegistrationFields( Boolean disableRegistrationFields )
- {
- this.disableRegistrationFields = disableRegistrationFields;
- }
-
private Boolean displayOnAllOrgunit;
public void setDisplayOnAllOrgunit( Boolean displayOnAllOrgunit )
@@ -258,7 +251,6 @@
ignoreOverdueEvents = (ignoreOverdueEvents == null) ? false : ignoreOverdueEvents;
blockEntryForm = (blockEntryForm == null) ? false : blockEntryForm;
remindCompleted = (remindCompleted == null) ? false : remindCompleted;
- disableRegistrationFields = (disableRegistrationFields == null) ? false : disableRegistrationFields;
displayOnAllOrgunit = (displayOnAllOrgunit == null) ? false : displayOnAllOrgunit;
Program program = programService.getProgram( id );
@@ -273,7 +265,6 @@
program.setBlockEntryForm( blockEntryForm );
program.setOnlyEnrollOnce( onlyEnrollOnce );
program.setRemindCompleted( remindCompleted );
- program.setDisableRegistrationFields( disableRegistrationFields );
program.setDisplayOnAllOrgunit( displayOnAllOrgunit );
if ( type == Program.MULTIPLE_EVENTS_WITH_REGISTRATION )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2013-07-02 14:26:44 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2013-07-09 03:26:26 +0000
@@ -147,12 +147,6 @@
</tr>
<tr name='nonAnonymous'>
- <td><label>$i18n.getString( "disable_registration_fields" )</label></td>
- <td><input type="checkbox" id="disableRegistrationFields" name="disableRegistrationFields" value='true' ></td>
- <td></td>
- </tr>
-
- <tr name='nonAnonymous'>
<td><label>$i18n.getString( "generated_events_by_enrollment_date" )</label></td>
<td><input type="checkbox" id="generatedByEnrollmentDate" name="generatedByEnrollmentDate" value='true'></td>
<td></td>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js 2013-07-02 14:26:44 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js 2013-07-09 03:26:26 +0000
@@ -41,9 +41,6 @@
var remindCompleted = ( json.program.remindCompleted == 'true') ? i18n_yes : i18n_no;
setInnerHTML( 'remindCompletedField', remindCompleted );
- var disableRegistrationFields = ( json.program.disableRegistrationFields == 'true') ? i18n_yes : i18n_no;
- setInnerHTML( 'disableRegistrationFieldsField', disableRegistrationFields );
-
setInnerHTML( 'dateOfEnrollmentDescriptionField', json.program.dateOfEnrollmentDescription );
setInnerHTML( 'dateOfIncidentDescriptionField', json.program.dateOfIncidentDescription );
setInnerHTML( 'programStageCountField', json.program.programStageCount );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm 2013-07-02 15:18:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm 2013-07-09 03:26:26 +0000
@@ -94,7 +94,6 @@
<p><label class="bold">$i18n.getString( "display_on_all_orgunits" ):</label><br><span id="displayOnAllOrgunitField"></span></p>
<p><label class="bold">$i18n.getString( "block_entry_form_after_completed" ):</label><br><span id="blockEntryFormField"></span></p>
<p><label class="bold">$i18n.getString( "remind_completing_program_after_program_stage_completed" ):</label><br><span id="remindCompletedField"></span></p>
- <p><label class="bold">$i18n.getString( "disable_registration_fields" ):</label><br><span id="disableRegistrationFieldsField"></span></p>
<p><label class="bold">$i18n.getString( "date_of_enrollment_description" ):</label><br><span id="dateOfEnrollmentDescriptionField"></span></p>
<p><label class="bold">$i18n.getString( "date_of_incident_description" ):</label><br><span id="dateOfIncidentDescriptionField"></span></p>
<p><label class="bold">$i18n.getString( "number_of_attributes" ):</label><br><span id="noAttributesField"></span></p>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2013-07-02 14:26:44 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2013-07-09 03:26:26 +0000
@@ -151,12 +151,6 @@
</tr>
<tr name='nonAnonymous'>
- <td><label>$i18n.getString( "disable_registration_fields" )</label></td>
- <td><input type="checkbox" id="disableRegistrationFields" name="disableRegistrationFields" value='true' #if($program.disableRegistrationFields=='true') checked #end #if( $program.type=='3' ) disabled #end ></td>
- <td></td>
- </tr>
-
- <tr name='nonAnonymous'>
<td><label>$i18n.getString( "generated_events_by_enrollment_date" )</label></td>
<td><input type="checkbox" id="generatedByEnrollmentDate" name="generatedByEnrollmentDate" value='true' #if($program.generatedByEnrollmentDate=='true') checked #end #if( $program.type!='1' ) disabled #end ></td>
<td></td>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewPatientRegistationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewPatientRegistationForm.vm 2013-07-03 15:40:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewPatientRegistationForm.vm 2013-07-09 03:26:26 +0000
@@ -51,16 +51,11 @@
<form id="saveDataEntryForm" name="saveDataEntryForm" action="savePatientRegistrationForm.action" method="post">
<input type="hidden" name="programId" id="programId" value="$!program.id"/>
-<input type="hidden" name="disableRegistrationFields" id="disableRegistrationFields" value="$!program.disableRegistrationFields"/>
<input type="hidden" name="dataEntryFormId" id="dataEntryFormId" value="$!registrationForm.dataEntryForm.id"/>
<h3>$i18n.getString( "add_patient_registration_form" )</h3>
<h4>$!program.displayName</h4>
-#set($disableRegistrationFields=false)
-#if($program)
- #set($disableRegistrationFields=$program.disableRegistrationFields)
-#end
<div class="container" >
<table id="detailsList" width="100%">
<col/>
@@ -126,12 +121,12 @@
<tr>
<td>
<select id="fixedAttrSelector" multiple="multiple" style="width:450px;height:270px" onclick='suggestionSelectorToggle()' ondblclick="insertElement( 'fixedAttr' )">
- <option value="registrationDate">$i18n.getString('registration_date') #if($disableRegistrationFields=='false')*#end</option>
- <option value="fullName">$i18n.getString('full_name') #if($disableRegistrationFields=='false')*#end</option>
- <option value="gender">$i18n.getString('gender') #if($disableRegistrationFields=='false')*#end</option>
- <option value="dobType">$i18n.getString('dob_type') #if($disableRegistrationFields=='false')*#end</option>
- <option value="birthDate">$i18n.getString('birth_date') #if($disableRegistrationFields=='false')*#end</option>
- <option value="age">$i18n.getString('age_years') #if($disableRegistrationFields=='false')*#end</option>
+ <option value="registrationDate">$i18n.getString('registration_date')</option>
+ <option value="fullName">$i18n.getString('full_name')</option>
+ <option value="gender">$i18n.getString('gender')</option>
+ <option value="dobType">$i18n.getString('dob_type')</option>
+ <option value="birthDate">$i18n.getString('birth_date')</option>
+ <option value="age">$i18n.getString('age_years')</option>
<option value="phoneNumber">$i18n.getString('phone_number')</option>
<option value="deathDate">$i18n.getString('death_date')</option>
<option value="isDead">$i18n.getString('is_dead')</option>
@@ -170,7 +165,7 @@
<td>
<select id="identifiersSelector" multiple="multiple" style="width:450px;height:270px" ondblclick="insertElement( 'iden' )">
#foreach( $identifierType in $identifierTypes )
- <option value="$identifierType.uid" mandatory='$identifierType.mandatory'>$encoder.htmlEncode($identifierType.displayName) #if($identifierType.mandatory=='true' && $disableRegistrationFields=='false') * #end </option>
+ <option value="$identifierType.uid" mandatory='$identifierType.mandatory'>$encoder.htmlEncode($identifierType.displayName) #if($identifierType.mandatory=='true') * #end </option>
#end
</select>
</td>