dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19400
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8442: Don't display Identifiers && Attributes tab in Dashboard.
------------------------------------------------------------
revno: 8442
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-10-09 11:15:10 +0700
message:
Don't display Identifiers && Attributes tab in Dashboard.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.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-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm 2012-10-07 05:32:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm 2012-10-09 04:15:10 +0000
@@ -41,53 +41,51 @@
<!-- Enroll program TAB -->
<div id="tab-2">
<form id='programEnrollmentInforForm' name='programEnrollmentInforForm' action='#' method="POST" >
- #if( ( $!noIden && $!noIden > 0) || ( $!noOtherGroup && $!noOtherGroup > 0) || ( $!noGroup && $!noGroup > 0 ) )
- <!-- IDENTIFIERS -->
- <table id='enrollmentInforDiv' name='enrollmentInforDiv' class='mainPageTable' >
- #set( $mark = false )
- #foreach ($identifierType in $identifierTypes)
- #set( $identifier = '')
- #set( $identifier = $identiferMap.get( $identifierType.id ) )
- <tr #alternate( $mark )>
- <td class='text-column'><label>$identifierType.name #if($identifierType.mandatory == true )<em title="$i18n.getString( 'required' )" class="required">*</em> #end</label></td>
- <td class="input-column">
- <input type="text" id="iden$identifierType.id" name="iden$identifierType.id" value='$!identifier' class="{validate:{required:$identifierType.mandatory, #if($!identifierType.noChars) maxlength:$identifierType.noChars, #end #if($identifierType.type=='number') number:true #elseif($!identifierType.type=='letter') lettersonly:true #end }}" />
- </td>
- </tr>
- #set( $mark = !$mark )
- #end
-
- <!-- ATTRIBUTES IN GROUPS -->
- #foreach($attribute in $patientAttributes )
- #set( $attributeValue = $!patientAttributeValueMap.get( $attribute.id ) )
+ <!-- IDENTIFIERS -->
+ <table id='enrollmentInforDiv' name='enrollmentInforDiv' class='mainPageTable' >
+ #set( $mark = false )
+ #foreach ($identifierType in $identifierTypes)
+ #set( $identifier = '')
+ #set( $identifier = $identiferMap.get( $identifierType.id ) )
<tr #alternate( $mark )>
- <td class='text-column'><label>$attribute.name #if($attribute.mandatory)<em title="$i18n.getString( "required" )" class="required">*</em> #end</label></td>
- <td class="input-column" >
- #if( $attribute.valueType == "YES/NO" )
- <select id="attr$attribute.id" name="attr$attribute.id" >
- <option value="">[$i18n.getString( "please_select" )]</option>
- <option value="true" #if( $attributeValue=='true') selected="selected" #end>$i18n.getString( "yes" )</option>
- <option value="false" #if( $attributeValue=='false') selected="selected" #end>$i18n.getString( "no" )</option>
- </select>
- #elseif( $attribute.valueType == "DATE" )
- <input type="text" id="attr$attribute.id" name="attr$attribute.id" value="$!attributeValue" objectId='$attribute.id' objectType='attr' class=' #validate( "default" $attribute.mandatory )' >
- <script type="text/javascript">
- datePickerValid( 'attr$attribute.id' );
- </script>
- #elseif( $attribute.valueType == "COMBO" )
- <select id="attr$attribute.id" name="attr$attribute.id" class=' #validate( "default" $attribute.mandatory )' >
- <option value="">[$i18n.getString( "please_select" )]</option>
- #foreach ($option in $attribute.attributeOptions )
- <option value="$option.id" #if($attributeValue == $option.name) selected="selected" #end>$option.name</option>
- #end
- </select>
- #else
- <input type="text" id="attr$attribute.id" name="attr$attribute.id" value="$!attributeValue" class="{validate:{required:$attribute.mandatory #if($!attribute.noChars),maxlength:$attribute.noChars #end #if($attribute.valueType=='NUMBER'),number:true #end }}" >
- #end
- </td>
+ <td class='text-column'><label>$identifierType.name #if($identifierType.mandatory == true )<em title="$i18n.getString( 'required' )" class="required">*</em> #end</label></td>
+ <td class="input-column">
+ <input type="text" id="iden$identifierType.id" name="iden$identifierType.id" value='$!identifier' class="{validate:{required:$identifierType.mandatory, #if($!identifierType.noChars) maxlength:$identifierType.noChars, #end #if($identifierType.type=='number') number:true #elseif($!identifierType.type=='letter') lettersonly:true #end }}" />
+ </td>
</tr>
#set( $mark = !$mark )
#end
+
+ <!-- ATTRIBUTES IN GROUPS -->
+ #foreach($attribute in $patientAttributes )
+ #set( $attributeValue = $!patientAttributeValueMap.get( $attribute.id ) )
+ <tr #alternate( $mark )>
+ <td class='text-column'><label>$attribute.name #if($attribute.mandatory)<em title="$i18n.getString( "required" )" class="required">*</em> #end</label></td>
+ <td class="input-column" >
+ #if( $attribute.valueType == "YES/NO" )
+ <select id="attr$attribute.id" name="attr$attribute.id" >
+ <option value="">[$i18n.getString( "please_select" )]</option>
+ <option value="true" #if( $attributeValue=='true') selected="selected" #end>$i18n.getString( "yes" )</option>
+ <option value="false" #if( $attributeValue=='false') selected="selected" #end>$i18n.getString( "no" )</option>
+ </select>
+ #elseif( $attribute.valueType == "DATE" )
+ <input type="text" id="attr$attribute.id" name="attr$attribute.id" value="$!attributeValue" objectId='$attribute.id' objectType='attr' class=' #validate( "default" $attribute.mandatory )' >
+ <script type="text/javascript">
+ datePickerValid( 'attr$attribute.id' );
+ </script>
+ #elseif( $attribute.valueType == "COMBO" )
+ <select id="attr$attribute.id" name="attr$attribute.id" class=' #validate( "default" $attribute.mandatory )' >
+ <option value="">[$i18n.getString( "please_select" )]</option>
+ #foreach ($option in $attribute.attributeOptions )
+ <option value="$option.id" #if($attributeValue == $option.name) selected="selected" #end>$option.name</option>
+ #end
+ </select>
+ #else
+ <input type="text" id="attr$attribute.id" name="attr$attribute.id" value="$!attributeValue" class="{validate:{required:$attribute.mandatory #if($!attribute.noChars),maxlength:$attribute.noChars #end #if($attribute.valueType=='NUMBER'),number:true #end }}" >
+ #end
+ </td>
+ </tr>
+ #set( $mark = !$mark )
<tr><td> </td></tr>
<tr>
<td></td>
@@ -114,7 +112,6 @@
#end
<script type="text/javascript">
-
jQuery("#programEnrollmentInforForm").ready( function(){
validation( 'programEnrollmentInforForm', function(form){
saveIdentifierAndAttribute( $programInstance.patient.id, $programInstance.program.id, 'programEnrollmentInforForm' );
@@ -143,7 +140,8 @@
$( "#tabs" ).tabs("remove", 0);
#end
#else
- #if( ( $noIden && $noIden > 0) || ( $noOtherGroup && $noOtherGroup > 0) || ( $noGroup && $noGroup > 0 ))
+ #if( ($identifierTypes && $identifierTypes.size() > 0)
+ || ($patientAttributes && $patientAttributes.size() > 0) )
$( "#tabs" ).tabs( "option", "selected", 1 );
#else
$( "#tabs" ).tabs( "option", "selected", 2 );