← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14755: remove localId from teAttribute forms again (since it was put back)

 

------------------------------------------------------------
revno: 14755
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-04-09 11:03:06 +0700
message:
  remove localId from teAttribute forms again (since it was put back)
modified:
  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/javascript/addAttributeForm.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-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-04 11:49:44 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/addAttributeForm.vm	2014-04-09 04:03:06 +0000
@@ -67,7 +67,6 @@
                 <option value="age">$i18n.getString( "age" )</option>
                 <option value="users">$i18n.getString( "users" )</option>
                 <option value="combo">$i18n.getString( "attribute_combo_type" )</option>
-				<option value="localId">$i18n.getString( "local_identifier" )</option>
             </select>
         </td>
         <td></td>
@@ -101,19 +100,6 @@
 			</td>
 			<td></td>
 		</tr>
-		
-		<tr name='localIdField' style='display:none;'>
-			<td><label for="type">$i18n.getString( "period_type" )</label></td>
-			<td>
-				<select type='checkbox' id="periodTypeName" name="periodTypeName" >
-					<option value="">[$i18n.getString( "please_select" )]</option>
-					#foreach ( $periodType in $periodTypes )
-					<option value="$periodType.name">$i18n.getString( $periodType.name )</option>
-					#end
-				</select>
-			</td>
-			<td></td>
-		</tr>
 
     </tbody>
 

=== 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-04 11:49:44 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/addAttributeForm.js	2014-04-09 04:03:06 +0000
@@ -1,9 +1,13 @@
-jQuery(document).ready(	function(){
-	validation( 'addAttributeForm', function(form){
-		form.submit();
-	})
-
-	checkValueIsExist( "name", "validateAttribute.action");
-	checkValueIsExist( "shortName", "validateAttribute.action");
-	checkValueIsExist( "code", "validateAttribute.action");
-});	
\ No newline at end of file
+jQuery(document).ready(function() {
+  validation('addAttributeForm', function( form ) {
+    form.submit();
+  })
+
+  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/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-04 11:49:44 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/javascript/updateAttributeForm.js	2014-04-09 04:03:06 +0000
@@ -1,9 +1,17 @@
-jQuery(document).ready(	function(){
-	validation( 'updateAttributeForm', function(form){
-		form.submit();
-	});
-	
-	checkValueIsExist( "name", "validateAttribute.action", {id:getFieldValue('id')});
-	checkValueIsExist( "shortName", "validateAttribute.action", {id:getFieldValue('id')});
-	checkValueIsExist( "code", "validateAttribute.action", {id:getFieldValue('id')});
-});		
\ No newline at end of file
+jQuery(document).ready(function() {
+  validation('updateAttributeForm', function( form ) {
+    form.submit();
+  });
+
+  checkValueIsExist("name", "validateAttribute.action", {id: getFieldValue('id')});
+  checkValueIsExist("shortName", "validateAttribute.action", {id: getFieldValue('id')});
+  checkValueIsExist("code", "validateAttribute.action", {id: getFieldValue('id')});
+
+  if( $('#unique').is(':checked') ) {
+    $("[name='localIdField']").show();
+  }
+
+  $('#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/updateAttibuteForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/updateAttibuteForm.vm	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/updateAttibuteForm.vm	2014-04-09 04:03:06 +0000
@@ -63,7 +63,6 @@
 				<option value="age" #if( $attribute.valueType == 'age' ) selected="selected" #end>$i18n.getString( "age" )</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="localId" #if( $attribute.valueType == 'localId' ) selected="selected" #end>$i18n.getString( "local_identifier" )</option>
             </select>
         </td>
     </tr>
@@ -97,20 +96,7 @@
 		</td>
 		<td></td>
 	</tr>
-	
-	<tr name='localIdField' #if($attribute.valueType!='localId' ) style='display:none;' #end>
-		<td><label for="type">$i18n.getString( "period_type" )</label></td>
-		<td>
-			<select type='checkbox' id="periodTypeName" name="periodTypeName" >
-				<option value="">[$i18n.getString( "please_select" )]</option>
-				#foreach ( $periodType in $periodTypes )
-				<option value="$periodType.name" #if( $attribute.periodType.name==$periodType.name ) selected #end>$i18n.getString( $periodType.name )</option>
-				#end
-			</select>
-		</td>
-		<td></td>
-	</tr>
-		
+
     </tbody>
 	
 	<tr>