dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #29470
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14895: Small changes in Add/Update tracked-entity-attribute form.
------------------------------------------------------------
revno: 14895
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-04-18 16:58:14 +0800
message:
Small changes in Add/Update tracked-entity-attribute form.
modified:
dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonTrackedEntityAttribute.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/AddAttributeAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/UpdateAttributeAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attribute.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addAttributeForm.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/attribute.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateAttributeForm.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.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-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java 2014-04-18 04:25:11 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java 2014-04-18 08:58:14 +0000
@@ -482,8 +482,7 @@
if ( attribute.getOrgunitScope() )
{
- criteria.createAlias( "organisationUnit", "orgunit" );
- criteria.add( Restrictions.eq( "orgunit.id", instance.getOrganisationUnit().getId() ) );
+ criteria.add( Restrictions.eq( "organisationUnit", instance.getOrganisationUnit() ) );
}
if ( program != null && attribute.getProgramScope() )
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonTrackedEntityAttribute.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonTrackedEntityAttribute.vm 2014-03-20 05:43:18 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonTrackedEntityAttribute.vm 2014-04-18 08:58:14 +0000
@@ -8,6 +8,8 @@
"valueType": "$!attribute.valueType",
"displayInListNoProgram": "$!attribute.displayInListNoProgram",
"inherit": "$!attribute.inherit",
- "optionSet": "$!attribute.optionSet.name"
+ "optionSet": "$!attribute.optionSet.name",
+ "orgunitScope": "$!attribute.orgunitScope",
+ "programScope": "$!attribute.programScope"
}
}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/AddAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/AddAttributeAction.java 2014-04-12 15:32:37 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/AddAttributeAction.java 2014-04-18 08:58:14 +0000
@@ -28,7 +28,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import com.opensymphony.xwork2.Action;
import org.apache.commons.lang.StringUtils;
import org.hisp.dhis.option.OptionService;
import org.hisp.dhis.period.PeriodService;
@@ -36,6 +35,8 @@
import org.hisp.dhis.trackedentity.TrackedEntityAttributeService;
import org.springframework.beans.factory.annotation.Autowired;
+import com.opensymphony.xwork2.Action;
+
/**
* @author Abyot Asalefew Gizaw
* @version $Id$
@@ -43,6 +44,12 @@
public class AddAttributeAction
implements Action
{
+ private final Integer SCOPE_ORGUNIT = 1;
+
+ private final Integer SCOPE_PROGRAM = 2;
+
+ private final Integer SCOPE_PROGRAM_IN_ORGUNIT = 3;
+
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
@@ -127,20 +134,11 @@
this.optionSetId = optionSetId;
}
- // For Local ID type
-
- private Boolean orgunitScope;
-
- public void setOrgunitScope( Boolean orgunitScope )
- {
- this.orgunitScope = orgunitScope;
- }
-
- private Boolean programScope;
-
- public void setProgramScope( Boolean programScope )
- {
- this.programScope = programScope;
+ private Integer scope;
+
+ public void setScope( Integer scope )
+ {
+ this.scope = scope;
}
// -------------------------------------------------------------------------
@@ -168,9 +166,18 @@
if ( unique )
{
- orgunitScope = (orgunitScope == null) ? false : orgunitScope;
- programScope = (programScope == null) ? false : programScope;
+ boolean orgunitScope = false;
+ boolean programScope = false;
+ if ( scope != null && (scope == SCOPE_ORGUNIT || scope == SCOPE_PROGRAM_IN_ORGUNIT) )
+ {
+ orgunitScope = true;
+ }
+ if ( scope != null && (scope == SCOPE_PROGRAM || scope == SCOPE_PROGRAM_IN_ORGUNIT) )
+ {
+ programScope = true;
+ }
+
attribute.setOrgunitScope( orgunitScope );
attribute.setProgramScope( programScope );
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/UpdateAttributeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/UpdateAttributeAction.java 2014-04-12 15:32:37 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/UpdateAttributeAction.java 2014-04-18 08:58:14 +0000
@@ -28,7 +28,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import com.opensymphony.xwork2.Action;
import org.apache.commons.lang.StringUtils;
import org.hisp.dhis.option.OptionService;
import org.hisp.dhis.period.PeriodService;
@@ -36,6 +35,8 @@
import org.hisp.dhis.trackedentity.TrackedEntityAttributeService;
import org.springframework.beans.factory.annotation.Autowired;
+import com.opensymphony.xwork2.Action;
+
/**
* @author Abyot Asalefew Gizaw
* @version $Id$
@@ -43,7 +44,11 @@
public class UpdateAttributeAction
implements Action
{
- public static final String PREFIX_ATTRIBUTE_OPTION = "attrOption";
+ private final Integer SCOPE_ORGUNIT = 1;
+
+ private final Integer SCOPE_PROGRAM = 2;
+
+ private final Integer SCOPE_PROGRAM_IN_ORGUNIT = 3;
// -------------------------------------------------------------------------
// Dependencies
@@ -136,20 +141,11 @@
this.expression = expression;
}
- // For Local ID type
-
- private Boolean orgunitScope;
-
- public void setOrgunitScope( Boolean orgunitScope )
- {
- this.orgunitScope = orgunitScope;
- }
-
- private Boolean programScope;
-
- public void setProgramScope( Boolean programScope )
- {
- this.programScope = programScope;
+ private Integer scope;
+
+ public void setScope( Integer scope )
+ {
+ this.scope = scope;
}
// -------------------------------------------------------------------------
@@ -177,8 +173,17 @@
if ( unique )
{
- orgunitScope = (orgunitScope == null) ? false : orgunitScope;
- programScope = (programScope == null) ? false : programScope;
+ boolean orgunitScope = false;
+ boolean programScope = false;
+ if ( scope != null && (scope == SCOPE_ORGUNIT || scope == SCOPE_PROGRAM_IN_ORGUNIT) )
+ {
+ orgunitScope = true;
+ }
+
+ if ( scope != null && (scope == SCOPE_PROGRAM || scope == SCOPE_PROGRAM_IN_ORGUNIT) )
+ {
+ programScope = true;
+ }
attribute.setOrgunitScope( orgunitScope );
attribute.setProgramScope( programScope );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties 2014-04-14 12:42:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties 2014-04-18 08:58:14 +0000
@@ -490,4 +490,8 @@
number_of_tracked_entities = Number of tracked entities
incident_date = Incident Date
enrollment_date = Enrollment Date
-please_select_at_least_attribute_for_displaying_in_list = Please select at least attribute for displaying in list
\ No newline at end of file
+please_select_at_least_attribute_for_displaying_in_list = Please select at least attribute for displaying in list
+in = in
+whole_system = Whole system
+orgunit = Organisation unit
+program_within_orgunit = Program within Organisation unit
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm 2014-04-17 12:09:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm 2014-04-18 08:58:14 +0000
@@ -39,9 +39,17 @@
<tr>
<td><label for="unique">$i18n.getString( "unique" )</label></td>
<td>
- <input type='checkbox' id="unique" name="unique" value='true'>
- </td>
- <td></td>
+ <input type='checkbox' id="unique" name="unique" value='true' onchange='uniqueOnChange()'>
+ <span id='uniqueTR' name='uniqueTR' style='display:none;'>
+ $i18n.getString('in')
+ <select id='scope' name='scope' style='width:275px;'>
+ <option value="">$i18n.getString("whole_system")</option>
+ <option value="1">$i18n.getString("orgunit")</option>
+ <option value="2">$i18n.getString("program")</option>
+ <option value="3">$i18n.getString("program_within_orgunit")</option>
+ </select>
+ </span>
+ </td>
</tr>
<tr>
@@ -80,26 +88,6 @@
</td>
</tr>
- <tr name='localIdField' style='display:none;'>
- <th colspan='2'><label for="type">$i18n.getString( "scope" )</label></th>
- </tr>
-
- <tr name='localIdField' style='display:none;'>
- <td><label for="type">$i18n.getString( "orgunit" )</label></td>
- <td>
- <input type='checkbox' id="orgunitScope" name="orgunitScope" value='true' >
- </td>
- <td></td>
- </tr>
-
- <tr name='localIdField' style='display:none;'>
- <td><label for="type">$i18n.getString( "program" )</label></td>
- <td>
- <input type='checkbox' id="programScope" name="programScope" value='true' >
- </td>
- <td></td>
- </tr>
-
</tbody>
<tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attribute.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attribute.vm 2014-04-14 12:42:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attribute.vm 2014-04-18 08:58:14 +0000
@@ -56,6 +56,7 @@
<p><label class="bold">$i18n.getString( "name" ):</label><br><span id="nameField"></span></p>
<p><label class="bold">$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>
<p><label class="bold">$i18n.getString( "unique" ):</label><br><span id="uniqueField"></span></p>
+ <p><label class="bold">$i18n.getString( "scope" ):</label><br><span id="scopeField"></span></p>
<p><label class="bold">$i18n.getString( "inherit" ):</label><br><span id="inheritField"></span></p>
<p><label class="bold">$i18n.getString( "value_type" ):</label><br><span id="valueTypeField"></span></p>
<p><label class="bold">$i18n.getString( "option_set" ):</label><br><span id="optionSetField"></span></p>
@@ -83,4 +84,8 @@
var i18n_attribute_combo_type = '$encoder.jsEscape( $i18n.getString( "attribute_combo_type" ) , "'")';
var i18n_phone_number = '$encoder.jsEscape( $i18n.getString( "phone_number" ) , "'") ';
var i18n_tracker_associate = '$encoder.jsEscape( $i18n.getString( "tracker_associate" ) , "'") ';
+ var i18n_whole_system = '$encoder.jsEscape( $i18n.getString( "whole_system" ) , "'") ';
+ var i18n_orgunit = '$encoder.jsEscape( $i18n.getString( "orgunit" ) , "'") ';
+ var i18n_program = '$encoder.jsEscape( $i18n.getString( "program" ) , "'") ';
+ var i18n_program_within_orgunit = '$encoder.jsEscape( $i18n.getString( "program_within_orgunit" ) , "'") ';
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addAttributeForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addAttributeForm.js 2014-04-12 11:34:06 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addAttributeForm.js 2014-04-18 08:58:14 +0000
@@ -6,8 +6,4 @@
checkValueIsExist( "name", "validateAttribute.action");
checkValueIsExist( "shortName", "validateAttribute.action");
checkValueIsExist( "code", "validateAttribute.action");
-
- $('#unique').on('click', function() {
- $("[name='localIdField']").toggle();
- });
});
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/attribute.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/attribute.js 2014-04-04 11:49:44 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/attribute.js 2014-04-18 08:58:14 +0000
@@ -29,7 +29,24 @@
var valueType = json.attribute.valueType;
var typeMap = attributeTypeMap();
- setInnerHTML( 'valueTypeField', typeMap[valueType] );
+ setInnerHTML( 'valueTypeField', typeMap[valueType] );
+
+ if(json.attribute.unique == 'true'){
+ var orgunitScope = json.attribute.orgunitScope;
+ var programScope = json.attribute.programScope;
+ if( orgunitScope=='false' && programScope=='false' ){
+ setInnerHTML( 'scopeField', i18n_whole_system);
+ }
+ else if(orgunitScope=='true' && programScope=='false' ){
+ setInnerHTML( 'scopeField', i18n_orgunit);
+ }
+ else if(orgunitScope=='false' && programScope=='true' ){
+ setInnerHTML( 'scopeField', i18n_program);
+ }
+ else{
+ setInnerHTML( 'scopeField', i18n_program_within_orgunit);
+ }
+ }
showDetails();
});
@@ -60,21 +77,36 @@
function typeOnChange() {
- var type = getFieldValue('valueType');
- if( type=="combo"){
+ if( getFieldValue('valueType')=="combo"){
showById("optionSetRow");
enable("optionSetId");
- jQuery('[name=localIdField]').hide();
}
- else if( type == 'localId' ) {
- jQuery('[name=localIdField]').show();
+ else{
hideById("optionSetRow");
disable("optionSetId");
}
+}
+
+function uniqueOnChange(){
+ if( $('#unique').attr('checked')=="checked") {
+ jQuery('[name=uniqueTR]').show();
+ jQuery('#valueType [value=bool]').hide();
+ jQuery('#valueType [value=trueOnly]').hide();
+ jQuery('#valueType [value=date]').hide();
+ jQuery('#valueType [value=phoneNumber]').hide();
+ jQuery('#valueType [value=trackerAssociate]').hide();
+ jQuery('#valueType [value=users]').hide();
+ jQuery('#valueType [value=combo]').hide();
+ }
else {
- jQuery('[name=localIdField]').hide();
- hideById("optionSetRow");
- disable("optionSetId");
+ jQuery('[name=uniqueTR]').hide();
+ jQuery('#valueType [value=bool]').show();
+ jQuery('#valueType [value=trueOnly]').show();
+ jQuery('#valueType [value=date]').show();
+ jQuery('#valueType [value=phoneNumber]').show();
+ jQuery('#valueType [value=trackerAssociate]').show();
+ jQuery('#valueType [value=users]').show();
+ jQuery('#valueType [value=combo]').show();
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateAttributeForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateAttributeForm.js 2014-04-17 12:15:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateAttributeForm.js 2014-04-18 08:58:14 +0000
@@ -6,10 +6,4 @@
checkValueIsExist( "name", "validateAttribute.action", {id:getFieldValue('id')});
checkValueIsExist( "shortName", "validateAttribute.action", {id:getFieldValue('id')});
checkValueIsExist( "code", "validateAttribute.action", {id:getFieldValue('id')});
-
- $('#unique').on('click', function() {
- $("[name='localIdField']").toggle();
- });
-
- $('#unique').trigger('click');
});
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm 2014-04-17 12:09:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm 2014-04-18 08:58:14 +0000
@@ -35,7 +35,16 @@
<tr>
<td><label for="unique">$i18n.getString( "unique" )</label></td>
<td>
- <input type='checkbox' id="unique" name="unique" value='true' #if( $attribute.unique ) checked #end>
+ <input type='checkbox' id="unique" name="unique" value='true' #if( $attribute.unique=='true' ) checked #end onchange='uniqueOnChange()' />
+ <span id='uniqueTR' name='uniqueTR' style="#if( $attribute.unique=='false' ) display:none; #end" >
+ $i18n.getString('in')
+ <select id='scope' name='scope' style='width:275px;'>
+ <option value="" #if( $attribute.orgunitScope=='false' && $attribute.programScope=='false' ) selected #end >$i18n.getString("whole_system")</option>
+ <option value="1" #if( $attribute.orgunitScope=='true' && $attribute.programScope=='false' ) selected #end >$i18n.getString("orgunit")</option>
+ <option value="2" #if( $attribute.orgunitScope=='false' && $attribute.programScope=='true' ) selected #end >$i18n.getString("program")</option>
+ <option value="3" #if( $attribute.orgunitScope=='true' && $attribute.programScope=='true' ) selected #end>$i18n.getString("program_within_orgunit")</option>
+ </select>
+ </span>
</td>
<td></td>
</tr>
@@ -55,13 +64,13 @@
<option value="number" #if( $attribute.valueType == 'number' ) selected="selected" #end>$i18n.getString( "number" )</option>
<option value="string" #if( $attribute.valueType == 'string' ) selected="selected" #end>$i18n.getString( "text" )</option>
<option value="letter" #if( $attribute.valueType == 'letter' ) selected="selected" #end>$i18n.getString( "letter_only" )</option>
- <option value="bool" #if( $attribute.valueType == 'bool' ) selected="selected" #end>$i18n.getString( "yes_no" )</option>
- <option value="trueOnly" #if( $attribute.valueType == 'trueOnly' ) selected="selected" #end >$i18n.getString( "yes_only" )</option>
- <option value="date" #if( $attribute.valueType == 'date' ) selected="selected" #end>$i18n.getString( "date" )</option>
- <option value="phoneNumber" #if( $attribute.valueType == 'phoneNumber' ) selected="selected" #end>$i18n.getString( "phone_number" )</option>
- <option value="trackerAssociate" #if( $attribute.valueType == 'trackerAssociate' ) selected="selected" #end>$i18n.getString( "tracker_associate" )</option>
- <option value="users" #if( $attribute.valueType == 'users' ) selected="selected" #end>$i18n.getString( "users" )</option>
- <option value="combo" #if( $attribute.valueType == 'combo' ) selected="selected" #end>$i18n.getString( "attribute_combo_type" )</option>
+ <option value="bool" #if( $attribute.unique=='true' ) style='display:none' #end #if( $attribute.valueType == 'bool' ) selected="selected" #end>$i18n.getString( "yes_no" )</option>
+ <option value="trueOnly" #if( $attribute.unique=='true' ) style='display:none' #end #if( $attribute.valueType == 'trueOnly' ) selected="selected" #end >$i18n.getString( "yes_only" )</option>
+ <option value="date" #if( $attribute.unique=='true' ) style='display:none' #end #if( $attribute.valueType == 'date' ) selected="selected" #end>$i18n.getString( "date" )</option>
+ <option value="phoneNumber" #if( $attribute.unique=='true' ) style='display:none' #end #if( $attribute.valueType == 'phoneNumber' ) selected="selected" #end>$i18n.getString( "phone_number" )</option>
+ <option value="trackerAssociate" #if( $attribute.unique=='true' ) style='display:none' #end #if( $attribute.valueType == 'trackerAssociate' ) selected="selected" #end>$i18n.getString( "tracker_associate" )</option>
+ <option value="users" #if( $attribute.unique=='true' ) style='display:none' #end #if( $attribute.valueType == 'users' ) selected="selected" #end>$i18n.getString( "users" )</option>
+ <option value="combo" #if( $attribute.unique=='true' ) style='display:none' #end #if( $attribute.valueType == 'combo' ) selected="selected" #end>$i18n.getString( "attribute_combo_type" )</option>
</select>
</td>
</tr>
@@ -75,26 +84,6 @@
</select>
</td>
</tr>
-
- <tr name='localIdField' #if($attribute.valueType!='localId' ) style='display:none;' #end >
- <th colspan='2'><label for="type">$i18n.getString( "scope" )</label></th>
- </tr>
-
- <tr name='localIdField' #if($attribute.valueType!='localId' ) style='display:none;' #end >
- <td><label for="type">$i18n.getString( "orgunit" )</label></td>
- <td>
- <input type='checkbox' id="orgunitScope" name="orgunitScope" value='true' #if( $attribute.orgunitScope=='true' ) checked #end >
- </td>
- <td></td>
- </tr>
-
- <tr name='localIdField' #if($attribute.valueType!='localId' ) style='display:none;' #end>
- <td><label for="type">$i18n.getString( "program" )</label></td>
- <td>
- <input type='checkbox' id="programScope" name="programScope" value='true' #if( $attribute.programScope=='true' ) checked #end >
- </td>
- <td></td>
- </tr>
</tbody>