← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16249: Validation rules, make sure filter is retained for edit/cancel

 

------------------------------------------------------------
revno: 16249
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2014-07-26 21:04:03 +0200
message:
  Validation rules, make sure filter is retained for edit/cancel
modified:
  dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleForm.vm
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleGroupForm.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-validationrule/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/struts.xml	2014-06-20 10:57:40 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/resources/struts.xml	2014-07-26 19:04:03 +0000
@@ -70,7 +70,7 @@
     </action>
 
     <action name="updateValidationRule" class="org.hisp.dhis.validationrule.action.UpdateValidationRuleAction">
-      <result name="success" type="redirect">validationRule.action?currentPage=${keyCurrentPage}</result>
+      <result name="success" type="redirect">validationRule.action?currentPage=${keyCurrentPage}&amp;key=${keyCurrentKey}</result>
       <param name="requiredAuthorities">F_VALIDATIONRULE_ADD</param>
     </action>
 
@@ -123,7 +123,7 @@
 
     <action name="updateValidationRuleGroup"
       class="org.hisp.dhis.validationrule.action.validationrulegroup.UpdateValidationRuleGroupAction">
-      <result name="success" type="redirect">showValidationRuleGroupForm.action?currentPage=${keyCurrentPage}</result>
+      <result name="success" type="redirect">showValidationRuleGroupForm.action?currentPage=${keyCurrentPage}&amp;key=${keyCurrentKey}</result>
       <param name="anyAuthorities">F_VALIDATIONRULEGROUP_PUBLIC_ADD, F_VALIDATIONRULEGROUP_PRIVATE_ADD</param>
     </action>
 

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleForm.vm	2014-03-04 00:22:37 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleForm.vm	2014-07-26 19:04:03 +0000
@@ -117,7 +117,7 @@
 	<tr>
 		<td></td>
 		<td><input type="submit" value="$i18n.getString( 'save' )" style="width:10em">
-		    <input type="button" value="$i18n.getString( 'cancel' )" id="cancel" name="cancel" onclick="window.location.href='validationRule.action'" style="width:10em"></td>		
+		    <input type="button" value="$i18n.getString( 'cancel' )" id="cancel" name="cancel" onclick="dhis2.commons.redirectCurrentPage( 'validationRule.action' )" style="width:10em"></td>		
 	</tr>
 </table>
 </form>

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleGroupForm.vm	2014-03-28 01:51:34 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleGroupForm.vm	2014-07-26 19:04:03 +0000
@@ -126,7 +126,7 @@
 
 <p>
 	<input type="submit" value="$i18n.getString( "save" )" style="width:10em" />
-	<input type="button" value="$i18n.getString( "cancel" )" onclick="window.location.href='showValidationRuleGroupForm.action'" style="width:10em" />
+	<input type="button" value="$i18n.getString( "cancel" )" onclick="dhis2.commons.redirectCurrentPage( 'showValidationRuleGroupForm.action' )" style="width:10em" />
 </p>
 
 </form>