Set newurl on admin actions to stay on the page
authorSimo Sorce <simo@redhat.com>
Mon, 27 Oct 2014 14:43:27 +0000 (10:43 -0400)
committerPatrick Uiterwijk <puiterwijk@redhat.com>
Wed, 12 Nov 2014 22:47:23 +0000 (23:47 +0100)
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 <simo@redhat.com>
Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
ipsilon/admin/common.py

index 3d5313a..530cb22 100755 (executable)
@@ -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