dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13670
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4443: Fixed bug with custom forms
------------------------------------------------------------
revno: 4443
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-08-25 14:32:42 +0200
message:
Fixed bug with custom forms
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js
--
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-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java 2011-08-17 12:25:41 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java 2011-08-25 12:32:42 +0000
@@ -232,8 +232,8 @@
int i = 1;
- final String jsCodeForInputFields = " name=\"ef\" ";
- final String jsCodeForSelectLists = " name=\"es\" ";
+ final String jsCodeForInputFields = " name=\"entryfield\" ";
+ final String jsCodeForSelectLists = " name=\"entryselect\" ";
StringBuffer sb = new StringBuffer();
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2011-08-23 17:19:45 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2011-08-25 12:32:42 +0000
@@ -14,6 +14,7 @@
// -----------------------------------------------------------------------------
// Save
// -----------------------------------------------------------------------------
+
var FORMULA_PATTERN = /\[.+?\]/g;
var SEPARATOR = '.';
@@ -23,8 +24,6 @@
*/
function updateIndicators()
{
-// var entryFieldValues = getEntryFieldValues();
-
$( 'input[name="indicator"]' ).each( function( index )
{
var indicatorId = $( this ).attr( 'indicatorid' );
@@ -42,23 +41,6 @@
}
/**
- * Returns an associative array with an entry for each entry input field in the
- * form where the key is the input field id and the value is the input field
- * value.
- */
-function getEntryFieldValues()
-{
- var entryFieldValues = new Array();
-
- $( 'input[name="entryfield"]' ).each( function( index )
- {
- entryFieldValues[$( this ).attr( 'id' )] = $( this ).attr( 'value' );
- } );
-
- return entryFieldValues;
-}
-
-/**
* Parses the expression and substitues the operand identifiers with the value
* of the corresponding input entry field.
*/