← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2393: Excel reporting - Fixed bug <690531> Can't edit assign user-roles.

 

------------------------------------------------------------
revno: 2393
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2010-12-17 11:01:43 +0700
message:
  Excel reporting - Fixed bug <690531> Can't edit assign user-roles.
modified:
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/UpdateReportExcelUserRoleAction.java
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reportExcelUserRoles.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-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/UpdateReportExcelUserRoleAction.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/UpdateReportExcelUserRoleAction.java	2010-04-26 08:34:42 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/action/UpdateReportExcelUserRoleAction.java	2010-12-17 04:01:43 +0000
@@ -47,9 +47,9 @@
     implements Action
 {
 
-    // -------------------------------------------
+    // -------------------------------------------------------------------------
     // Dependency
-    // -------------------------------------------
+    // -------------------------------------------------------------------------
 
     private ReportExcelService reportService;
 
@@ -65,11 +65,11 @@
         this.userStore = userStore;
     }
 
-    // -------------------------------------------
+    // -------------------------------------------------------------------------
     // Input
-    // -------------------------------------------
+    // -------------------------------------------------------------------------
 
-    private Collection<Integer> userRoles;
+    private Collection<Integer> userRoles = new HashSet<Integer>();
 
     public void setUserRoles( Collection<Integer> userRoles )
     {

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reportExcelUserRoles.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reportExcelUserRoles.vm	2010-04-26 08:34:42 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reportExcelUserRoles.vm	2010-12-17 04:01:43 +0000
@@ -1,6 +1,6 @@
 <h3>$i18n.getString( "update_reportexcel_userrole" )</h3>
 
-<form name="userRole" action="updateReportExcelUserRole.action" method="POST">
+<form name="userRole" action="updateReportExcelUserRole.action" method="POST" onsubmit="selectAllById( 'selectedList' );">
 <input type="hidden" name="id" value="$reportExcel.id"/>
 <table>
 	<tr>
@@ -36,14 +36,11 @@
 	</tr>
 </table>
 <br>
-<input type="button" value="$i18n.getString( 'ok' )" style="width:100px" onclick="submitForm()"/>
+<input type="submit" value="$i18n.getString( 'ok' )" style="width:100px"/>
 <input type="button" value="$i18n.getString( 'cancel' )"  style="width:100px" onclick="window.location = 'listReportExcel.action'"/>
 </form>
+
 <script>
-	function submitForm(){
-		selectAllById( 'selectedList' );
-		document.forms['userRole'].submit();
-	}
 	$(document).ready(function(){
 		sortList('availableList', 'ASC');
 		sortList('selectedList', 'ASC');