From: Simo Sorce Date: Mon, 27 Oct 2014 14:43:27 +0000 (-0400) Subject: Set newurl on admin actions to stay on the page X-Git-Tag: v0.3.0~25 X-Git-Url: http://git.cascardo.info/?p=cascardo%2Fipsilon.git;a=commitdiff_plain;h=c6b167fcf290c415b8d1903237fb5405b7213405 Set newurl on admin actions to stay on the page By setting newurl, the browser state is replaced with the base configuration URL, so that user actions like hitting reload do not end up trying to trigger another change or an enablement/disablement of a plugin. It also insures actions are not accidentally triggered when hitting the back button. Signed-off-by: Simo Sorce Reviewed-by: Patrick Uiterwijk --- diff --git a/ipsilon/admin/common.py b/ipsilon/admin/common.py index 3d5313a..530cb22 100755 --- a/ipsilon/admin/common.py +++ b/ipsilon/admin/common.py @@ -230,7 +230,8 @@ class AdminPlugins(AdminPage): 'message_type': message_type, 'available': plugins['available'], 'enabled': enabled, - 'baseurl': self.url} + 'baseurl': self.url, + 'newurl': self.url} if self.order: targs['order_name'] = '%s_order_form' % self.name targs['order_action'] = self.order.url