dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40233
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20382: Add a new data value type, coordinate. Will allow for collection of coordinates as data values. C...
Merge authors:
David Ershag (david-ershag)
Related merge proposals:
https://code.launchpad.net/~david-ershag/dhis2/trunk/+merge/272283
proposed by: jason.p.pickering (jason-p-pickering)
------------------------------------------------------------
revno: 20382 [merge]
committer: Jason P. Pickering <jason.p.pickering@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-09-28 08:45:15 +0200
message:
Add a new data value type, coordinate. Will allow for collection of coordinates as data values. Coordinates should be specified as long/lat in decimal degrees. Otherwise, treated as text currently in analytics.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java
dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java
dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/MathUtilsTest.java
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.validation.js
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js
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/select.vm
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/utils/NamebasedUtilsImpl.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addOptionForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addOptionSetForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateOptionSetForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_lo.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm
dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/patientRegistrationList.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/common/ValueType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java 2015-09-14 12:46:20 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java 2015-09-24 14:35:08 +0000
@@ -59,7 +59,8 @@
TRACKER_ASSOCIATE( TrackedEntityInstance.class ),
OPTION_SET( String.class ),
USERNAME( String.class ),
- FILE_RESOURCE( String.class );
+ FILE_RESOURCE( String.class ),
+ COORDINATE( String.class);
public static final List<ValueType> INTEGER_TYPES = Lists.newArrayList(
INTEGER, INTEGER_POSITIVE, INTEGER_NEGATIVE, INTEGER_ZERO_OR_POSITIVE );
@@ -68,7 +69,7 @@
INTEGER, INTEGER_POSITIVE, INTEGER_NEGATIVE, INTEGER_ZERO_OR_POSITIVE, NUMBER, UNIT_INTERVAL, PERCENTAGE );
public static final List<ValueType> TEXT_TYPES = Lists.newArrayList(
- TEXT, LONG_TEXT, LETTER );
+ TEXT, LONG_TEXT, LETTER, COORDINATE );
private final Class<?> javaClass;
@@ -99,7 +100,7 @@
public boolean isText()
{
- return this == TEXT || this == LONG_TEXT;
+ return this == TEXT || this == LONG_TEXT || this == COORDINATE;
}
public boolean isDate()
@@ -111,4 +112,9 @@
{
return this == FILE_RESOURCE;
}
+
+ public boolean isCoordinate()
+ {
+ return this == COORDINATE;
+ }
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties 2015-09-26 16:08:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/i18n_global.properties 2015-09-28 06:45:15 +0000
@@ -536,6 +536,7 @@
number=Number
positive_integer=Positive Integer
zero_positive_int=Positive or Zero Integer
+coordinate=Coordinate
negative_integer=Negative Integer
unit_interval=Unit interval
percentage=Percentage
@@ -556,6 +557,7 @@
value_must_zero_or_positive_integer=Value must be zero or a positive integer
value_must_unit_interval=Value must be a unit interval (between 0 and 1)
value_must_percentage=Value must be a percentage (between 0 and 100)
+value_must_coordinate=Value must be a coordinate (longitude, latitude)
#-- User account --------------------------------------------------------------#
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java 2015-09-15 09:54:24 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/dataelement/DataElementServiceTest.java 2015-09-24 14:36:33 +0000
@@ -334,6 +334,7 @@
DataElement dataElementD = createDataElement( 'D', ValueType.NUMBER );
DataElement dataElementE = createDataElement( 'E', ValueType.TEXT );
DataElement dataElementF = createDataElement( 'F', ValueType.LONG_TEXT );
+ DataElement dataElementG = createDataElement( 'G', ValueType.COORDINATE );
dataElementService.addDataElement( dataElementA );
dataElementService.addDataElement( dataElementB );
@@ -341,10 +342,11 @@
dataElementService.addDataElement( dataElementD );
dataElementService.addDataElement( dataElementE );
dataElementService.addDataElement( dataElementF );
+ dataElementService.addDataElement( dataElementG );
assertEquals( 3, dataElementService.getDataElementsByValueTypes( ValueType.INTEGER_TYPES ).size() );
assertEquals( 4, dataElementService.getDataElementsByValueTypes( ValueType.NUMERIC_TYPES ).size() );
- assertEquals( 2, dataElementService.getDataElementsByValueTypes( ValueType.TEXT_TYPES ).size() );
+ assertEquals( 3, dataElementService.getDataElementsByValueTypes( ValueType.TEXT_TYPES ).size() );
}
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.java 2015-09-21 10:49:56 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.java 2015-09-24 14:37:23 +0000
@@ -47,7 +47,7 @@
private static final Set<ValueType> VALUE_TYPES = Sets.newHashSet(
ValueType.BOOLEAN, ValueType.TRUE_ONLY, ValueType.TEXT, ValueType.LONG_TEXT, ValueType.LETTER,
ValueType.INTEGER, ValueType.INTEGER_POSITIVE, ValueType.INTEGER_NEGATIVE, ValueType.INTEGER_ZERO_OR_POSITIVE,
- ValueType.NUMBER, ValueType.UNIT_INTERVAL, ValueType.PERCENTAGE
+ ValueType.NUMBER, ValueType.UNIT_INTERVAL, ValueType.PERCENTAGE, ValueType.COORDINATE
);
@Override
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java 2015-09-21 09:01:11 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java 2015-09-24 14:38:17 +0000
@@ -426,6 +426,24 @@
}
/**
+ * Returns true if the provided string argument is to be considered a coordinate.
+ *
+ * @param value the value.
+ * @return true if the provided string argument is to be considered a coordinate.
+ */
+ public static boolean isCoordinate( String value )
+ {
+ try {
+ String[] lnglat = value.trim().split(",");
+ float lng = Float.parseFloat(lnglat[0]);
+ float lat = Float.parseFloat(lnglat[1]);
+ return (lng >= -180 && lng <= 180 && lat >= -90 && lat <= 90);
+ } catch (Exception x) {
+ return false;
+ }
+ }
+
+ /**
* Returns true if the provided string argument is to be considered a negative
* integer.
*
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java 2015-09-15 12:13:00 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ValidationUtils.java 2015-09-24 14:38:17 +0000
@@ -380,6 +380,11 @@
{
return "value_not_valid_file_resource_uid";
}
+
+ if ( ValueType.COORDINATE == valueType && !MathUtils.isCoordinate( value ))
+ {
+ return "value_not_coordinate";
+ }
return null;
}
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/MathUtilsTest.java'
--- dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/MathUtilsTest.java 2015-09-21 09:01:11 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/test/java/org/hisp/dhis/system/util/MathUtilsTest.java 2015-09-24 14:38:17 +0000
@@ -289,6 +289,31 @@
}
@Test
+ public void testIsCoordinate()
+ {
+ assertTrue( MathUtils.isCoordinate( "0.0,0.0" ) );
+ assertTrue( MathUtils.isCoordinate( "18, 65" ) );
+ assertTrue( MathUtils.isCoordinate( "18.56, 65.342" ) );
+ assertTrue( MathUtils.isCoordinate( "18.56,65.342" ) );
+ assertTrue( MathUtils.isCoordinate( "-18.56,-65.342" ) );
+ assertTrue( MathUtils.isCoordinate( " 18.56 , 65.342 " ) );
+ assertTrue( MathUtils.isCoordinate( " -180 , -90 " ) );
+
+ assertFalse( MathUtils.isCoordinate( "" ) );
+ assertFalse( MathUtils.isCoordinate( null ) );
+ assertFalse( MathUtils.isCoordinate( "18.56a, 65.342b" ) );
+ assertFalse( MathUtils.isCoordinate( "0" ) );
+ assertFalse( MathUtils.isCoordinate( "-0" ) );
+ assertFalse( MathUtils.isCoordinate( "Hey" ) );
+ assertFalse( MathUtils.isCoordinate( " 1" ) );
+ assertFalse( MathUtils.isCoordinate( "1 " ) );
+ assertFalse( MathUtils.isCoordinate( "1.2345,123, 123" ) );
+ assertFalse( MathUtils.isCoordinate( "12147483647" ) );
+ assertFalse( MathUtils.isCoordinate( "-181 ,-90" ) );
+ assertFalse( MathUtils.isCoordinate( "-180 , 91" ) );
+ }
+
+ @Test
public void testIsZero()
{
assertTrue( MathUtils.isZero( "0" ) );
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.validation.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.validation.js 2015-09-10 08:53:19 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.validation.js 2015-09-24 15:47:59 +0000
@@ -69,6 +69,20 @@
};
/**
+ * Allow coordinate.
+ */
+dhis2.validation.isCoordinate = function(value) {
+ try {
+ var m = value.match(/^([+-]?\d+(?:\.\d+)?)\s*,\s*([+-]?\d+(?:\.\d+)?)$/);
+ var lng = parseFloat(m[1]);
+ var lat = parseFloat(m[2]);
+ return lng >= -180 && lng <= 180 && lat >= -180 && lat <= 90;
+ } catch (_) {
+ return false;
+ }
+};
+
+/**
* Allow only negative integers, not zero and no thousands separators.
*/
dhis2.validation.isNegativeInt = function(value) {
@@ -127,6 +141,7 @@
* i18n_value_must_number
* i18n_value_must_positive_integer
* i18n_value_must_zero_or_positive_integer
+ * i18n_value_must_coordinate
* i18n_value_must_negative_integer
* i18n_value_must_unit_interval
* i18n_value_must_percentage
@@ -176,6 +191,14 @@
}
break;
}
+ case 'COORDINATE':
+ {
+ if( !dhis2.validation.isCoordinate(value) ) {
+ setHeaderDelayMessage(i18n_value_must_coordinate);
+ return false;
+ }
+ break;
+ }
case 'NUMBER':
{
if( !dhis2.validation.isNumber(value) ) {
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js 2014-01-23 14:09:55 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js 2015-09-14 11:09:56 +0000
@@ -436,6 +436,10 @@
return this.optional(element) || dhis2.validation.isZeroOrPositiveInt(value);
});
+jQuery.validator.addMethod("coordinate", function(value, element, param) {
+ return this.optional(element) || dhis2.validation.isCoordinate(value);
+});
+
// Support method for date
//Parse a string and convert it to a Date object.
//If string cannot be parsed, return null.
=== 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 2015-08-31 06:34:36 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js 2015-09-14 12:58:16 +0000
@@ -176,7 +176,7 @@
if ( value )
{
if ( type == 'TEXT' || type == 'NUMBER' || type == 'INTEGER' || type == 'INTEGER_POSITIVE' || type == 'INTEGER_NEGATIVE'
- || type == 'INTEGER_ZERO_OR_POSITIVE' || type == 'UNIT_INTERVAL' || type == 'PERCENTAGE' )
+ || type == 'INTEGER_ZERO_OR_POSITIVE' || type == 'UNIT_INTERVAL' || type == 'PERCENTAGE' || type == 'COORDINATE')
{
if ( value.length > dhis2.de.cst.valueMaxLength )
{
@@ -202,6 +202,10 @@
{
return dhis2.de.alertField( fieldId, i18n_value_must_zero_or_positive_integer + '\n\n' + dataElementName );
}
+ if ( type == 'COORDINATE' && !dhis2.validation.isCoordinate( value ) )
+ {
+ return dhis2.de.alertField( fieldId, i18n_value_must_coordinate + '\n\n' + dataElementName );
+ }
if ( type == 'UNIT_INTERVAL' && !dhis2.validation.isUnitInterval( value ) )
{
return dhis2.de.alertField( fieldId, i18n_value_must_unit_interval + '\n\n' + dataElementName );
=== 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 2014-11-17 15:08:22 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm 2015-09-14 11:09:56 +0000
@@ -12,6 +12,7 @@
var i18n_value_must_number = '$encoder.jsEscape( $i18n.getString( "value_must_number" ) , "'")';
var i18n_value_must_positive_integer = '$encoder.jsEscape( $i18n.getString( "value_must_positive_integer" ) , "'")';
var i18n_value_must_zero_or_positive_integer = '$encoder.jsEscape( $i18n.getString( "value_must_zero_or_positive_integer" ) , "'")';
+var i18n_value_must_coordinate = '$encoder.jsEscape( $i18n.getString( "value_must_coordinate" ) , "'")';
var i18n_value_must_negative_integer = '$encoder.jsEscape( $i18n.getString( "value_must_negative_integer" ) , "'")';
var i18n_value_must_unit_interval = '$encoder.jsEscape( $i18n.getString( "value_must_unit_interval" ) , "'")';
var i18n_value_must_percentage = '$encoder.jsEscape( $i18n.getString( "value_must_percentage" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java 2015-09-01 05:02:13 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/dataentry/action/SaveSectionFormAction.java 2015-09-14 11:09:56 +0000
@@ -379,6 +379,14 @@
typeViolations.put( key, "\"" + value + "\"" + " " + i18n.getString( "is_invalid_zero_or_positive_integer" ) );
}
}
+ else if ( ValueType.COORDINATE == valueType )
+ {
+ if ( !MathUtils.isCoordinate( value ) )
+ {
+ correctType = false;
+ typeViolations.put( key, "\"" + value + "\"" + " " + i18n.getString( "is_invalid_coordinate" ) );
+ }
+ }
}
// nothing entered
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/utils/NamebasedUtilsImpl.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/utils/NamebasedUtilsImpl.java 2015-09-01 05:02:13 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/utils/NamebasedUtilsImpl.java 2015-09-14 11:09:56 +0000
@@ -139,6 +139,13 @@
return "is_invalid_zero_or_positive_integer";
}
}
+ else if ( ValueType.COORDINATE == valueType )
+ {
+ if ( !MathUtils.isCoordinate( value ) )
+ {
+ return "is_invalid_coordinate";
+ }
+ }
return null;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addOptionForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addOptionForm.vm 2015-09-10 08:53:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addOptionForm.vm 2015-09-14 11:09:56 +0000
@@ -3,6 +3,7 @@
var i18n_value_must_number = '$encoder.jsEscape( $i18n.getString( "value_must_number" ) , "'")';
var i18n_value_must_positive_integer = '$encoder.jsEscape( $i18n.getString( "value_must_positive_integer" ) , "'")';
var i18n_value_must_zero_or_positive_integer = '$encoder.jsEscape( $i18n.getString( "value_must_zero_or_positive_integer" ) , "'")';
+ var i18n_value_must_coordinate = '$encoder.jsEscape( $i18n.getString( "value_must_coordinate" ) , "'")';
var i18n_value_must_negative_integer = '$encoder.jsEscape( $i18n.getString( "value_must_negative_integer" ) , "'")';
var i18n_value_must_unit_interval = '$encoder.jsEscape( $i18n.getString( "value_must_unit_interval" ) , "'")';
var i18n_value_must_percentage = '$encoder.jsEscape( $i18n.getString( "value_must_percentage" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addOptionSetForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addOptionSetForm.vm 2015-09-09 09:01:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addOptionSetForm.vm 2015-09-14 11:09:56 +0000
@@ -42,6 +42,7 @@
<option value="INTEGER_POSITIVE">$i18n.getString( "positive_integer" )</option>
<option value="INTEGER_NEGATIVE">$i18n.getString( "negative_integer" )</option>
<option value="INTEGER_ZERO_OR_POSITIVE">$i18n.getString( "zero_positive_int" )</option>
+ <option value="COORDINATE">$i18n.getString( "coordinate" )</option>
<option value="NUMBER">$i18n.getString( "number" )</option>
<option value="UNIT_INTERVAL">$i18n.getString( "unit_interval" )</option>
<option value="PERCENTAGE">$i18n.getString( "percentage" )</option>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateOptionSetForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateOptionSetForm.vm 2015-09-10 08:53:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateOptionSetForm.vm 2015-09-14 11:09:56 +0000
@@ -37,6 +37,7 @@
<option value="INTEGER_POSITIVE" #if( $!optionSet.valueType == 'INTEGER_POSITIVE' ) selected="selected" #end >$i18n.getString( "positive_integer" )</option>
<option value="INTEGER_NEGATIVE" #if( $!optionSet.valueType == 'INTEGER_NEGATIVE' ) selected="selected" #end >$i18n.getString( "negative_integer" )</option>
<option value="INTEGER_ZERO_OR_POSITIVE" #if( $!optionSet.valueType == 'INTEGER_ZERO_OR_POSITIVE' ) selected="selected" #end >$i18n.getString( "zero_positive_int" )</option>
+ <option value="COORDINATE" #if( $!optionSet.valueType == 'COORDINATE' ) selected="selected" #end >$i18n.getString( "coordinate" )</option>
<option value="NUMBER" #if( $!optionSet.valueType == 'NUMBER' ) selected="selected" #end >$i18n.getString( "number" )</option>
<option value="UNIT_INTERVAL" #if( $!optionSet.valueType == 'UNIT_INTERVAL' ) selected="selected" #end >$i18n.getString( "unit_interval" )</option>
<option value="PERCENTAGE" #if( $!optionSet.valueType == 'PERCENTAGE' ) selected="selected" #end >$i18n.getString( "percentage" )</option>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_lo.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_lo.properties 2014-10-17 08:19:44 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module_lo.properties 2015-09-14 11:09:56 +0000
@@ -166,6 +166,7 @@
int=Integer
positive_integer=Positive Integer
zero_positive_int=Positive or Zero Integer
+coordinate=Coordinate
negative_integer=Negative Integer
view_2=View 2
form_name=Form name
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm 2015-09-15 09:54:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementForm.vm 2015-09-21 06:23:59 +0000
@@ -92,6 +92,7 @@
<option value="INTEGER_POSITIVE" #if( $!dataElement.valueType == 'INTEGER_POSITIVE' ) selected="selected" #end >$i18n.getString( "positive_integer" )</option>
<option value="INTEGER_NEGATIVE" #if( $!dataElement.valueType == 'INTEGER_NEGATIVE' ) selected="selected" #end >$i18n.getString( "negative_integer" )</option>
<option value="INTEGER_ZERO_OR_POSITIVE" #if( $!dataElement.valueType == 'INTEGER_ZERO_OR_POSITIVE' ) selected="selected" #end >$i18n.getString( "zero_positive_int" )</option>
+ <option value="COORDINATE" #if( $!dataElement.valueType == 'COORDINATE' ) selected="selected" #end >$i18n.getString( "coordinate" )</option>
<option value="NUMBER" #if( $!dataElement.valueType == 'NUMBER' ) selected="selected" #end >$i18n.getString( "number" )</option>
<option value="UNIT_INTERVAL" #if( $!dataElement.valueType == 'UNIT_INTERVAL' ) selected="selected" #end >$i18n.getString( "unit_interval" )</option>
<option value="PERCENTAGE" #if( $!dataElement.valueType == 'PERCENTAGE' ) selected="selected" #end >$i18n.getString( "percentage" )</option>
=== modified file 'dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/patientRegistrationList.vm'
--- dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/patientRegistrationList.vm 2013-10-08 17:16:47 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/webapp/dhis-web-sms/patientRegistrationList.vm 2015-09-14 11:09:56 +0000
@@ -152,6 +152,7 @@
var i18n_value_must_number = '$encoder.jsEscape( $i18n.getString( "value_must_number" ) , "'")';
var i18n_value_must_positive_integer = '$encoder.jsEscape( $i18n.getString( "value_must_positive_integer" ) , "'")';
var i18n_value_must_zero_or_positive_integer = '$encoder.jsEscape( $i18n.getString( "value_must_zero_or_positive_integer" ) , "'")';
+ var i18n_value_must_coordinate = '$encoder.jsEscape( $i18n.getString( "value_must_coordinate" ) , "'")';
var i18n_value_must_negative_integer = '$encoder.jsEscape( $i18n.getString( "value_must_negative_integer" ) , "'")';
var i18n_invalid_date = '$encoder.jsEscape( $i18n.getString( "invalid_date" ) , "'")' + ".\n " + '$encoder.jsEscape( $i18n.getString( "format_date" ) , "'")' + " '" + dateFormat.replace('yy', 'yyyy') + " '" ;
var i18n_saving_value_failed_status_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_status_code" ) , "'")';