dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13441
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4310: Removed function for viewing forms in default version in data entry
------------------------------------------------------------
revno: 4310
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-08-16 09:51:39 +0200
message:
Removed function for viewing forms in default version in data entry
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.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-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java 2011-08-15 15:58:37 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java 2011-08-16 07:51:39 +0000
@@ -133,13 +133,6 @@
this.dataSetId = dataSetId;
}
- private boolean defaultForm;
-
- public void setDefaultForm( boolean defaultForm )
- {
- this.defaultForm = defaultForm;
- }
-
// -------------------------------------------------------------------------
// Output
// -------------------------------------------------------------------------
@@ -230,12 +223,6 @@
{
DataSet dataSet = dataSetService.getDataSet( dataSetId );
- // ---------------------------------------------------------------------
- // Get display mode
- // ---------------------------------------------------------------------
-
- String displayMode = defaultForm ? DataSet.TYPE_DEFAULT : dataSet.getDataSetType();
-
List<DataElement> dataElements = new ArrayList<DataElement>( dataSet.getDataElements() );
if ( dataElements.isEmpty() )
@@ -313,6 +300,8 @@
// Get data entry form
// ---------------------------------------------------------------------
+ String displayMode = dataSet.getDataSetType();
+
if ( displayMode.equals( DataSet.TYPE_SECTION ) )
{
getSectionForm( dataElements, dataSet );
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2011-08-15 15:58:37 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2011-08-16 07:51:39 +0000
@@ -154,22 +154,12 @@
{
console.log( 'Loading form remotely: ' + dataSetId );
- var defaultForm = $( '#defaultForm' ).is( ':checked' );
-
$( '#contentDiv' ).load( 'loadForm.action', {
- dataSetId : dataSetId,
- defaultForm : defaultForm
+ dataSetId : dataSetId
}, loadDataValues );
}
}
-function loadDefaultForm()
-{
- var dataSetId = $( '#selectedDataSetId' ).val();
-
- loadForm( dataSetId );
-}
-
// -----------------------------------------------------------------------------
// OrganisationUnit Selection
// -----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm 2011-08-13 17:39:25 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm 2011-08-16 07:51:39 +0000
@@ -80,9 +80,7 @@
</div>
<div id="actions" style="">
- <input type="button" value="$i18n.getString( 'run_validation' )" onclick="validate()" id="validationButton" style="width:150px;" disabled="disabled"/><br/><br/>
-
- <input type="checkbox" id="defaultForm" onclick="loadDefaultForm()" disabled="disabled"><label for="defaultForm">$i18n.getString( "use_default_form" )</label><br>
+ <input type="button" value="$i18n.getString( 'run_validation' )" onclick="validate()" id="validationButton" style="width:150px;" disabled="disabled"/>
</div>
<table>