← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20358: event-capture: bug fix in radio buttons

 

------------------------------------------------------------
revno: 20358
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-09-25 09:58:42 +0200
message:
  event-capture: bug fix in radio buttons
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html


--
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-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html	2015-09-24 14:38:58 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html	2015-09-25 07:58:42 +0000
@@ -338,7 +338,7 @@
                     <td >
                         <ng-form name="innerForm">
                             <div ng-if="prStDes[de.dataElement.id].dataElement.optionSetValue">
-                                <span ng-if="!selectedProgram.dataEntryMethod || optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options.length > 8">
+                                <span ng-if="!selectedProgram.dataEntryMethod || optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options.length >= 7">
                                     <ui-select ng-model="currentEvent[de.dataElement.id]" 
                                                theme="select2" 
                                                ng-required={{prStDes[de.dataElement.id].compulsory}}
@@ -352,25 +352,27 @@
                                         </ui-select-choices>
                                     </ui-select>
                                 </span>
-                                <span ng-if="selectedProgram.dataEntryMethod && prStDes[de.dataElement.id].dataElement.optionSet.options.length < 7">                                    
+                                <span ng-if="selectedProgram.dataEntryMethod && optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options.length < 7">                                    
                                     <label>
                                         <input type="radio" 
-                                               name="foo"  
+                                               name={{de.dataElement.id}}
                                                input-field-id={{de.dataElement.id}} 
                                                ng-change="saveDatavalue()" 
                                                ng-required={{prStDes[de.dataElement.id].compulsory}}
                                                ng-model="currentEvent[de.dataElement.id]"
                                                value="">{{'no_value' | translate}}<br>
-                                    </label>                                    
-                                    <label ng-repeat="option in optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options">
-                                        <input type="radio" 
-                                               name={{de.dataElement.id}}   
-                                               input-field-id={{de.dataElement.id}} 
-                                               ng-change="saveDatavalue()" 
-                                               ng-required={{prStDes[de.dataElement.id].compulsory}}
-                                               ng-model="currentEvent[de.dataElement.id]"
-                                               value={{option.name}}> {{option.name}}<br>                                        
-                                    </label>
+                                    </label><br>
+                                    <span ng-repeat="option in optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options">
+                                        <label>
+                                            <input type="radio" 
+                                                   name={{de.dataElement.id}}   
+                                                   input-field-id={{de.dataElement.id}} 
+                                                   ng-change="saveDatavalue()" 
+                                                   ng-required={{prStDes[de.dataElement.id].compulsory}}
+                                                   ng-model="currentEvent[de.dataElement.id]"
+                                                   value={{option.name}}> {{option.name}}<br>                                        
+                                        </label><br>
+                                    </span>                                    
                                 </span>
                             </div>
                             <div ng-if="!prStDes[de.dataElement.id].dataElement.optionSetValue" ng-switch="prStDes[de.dataElement.id].dataElement.valueType">