From 298e4c1f699b7d3b820090829645992571d77ad0 Mon Sep 17 00:00:00 2001 From: Ana Clara Lacerda Date: Tue, 10 Jul 2012 16:04:49 +0300 Subject: [PATCH] [IMP] Adding loading image when cloning --- indico/MaKaC/webinterface/pages/conferences.py | 2 +- indico/MaKaC/webinterface/rh/conferenceModif.py | 2 +- indico/MaKaC/webinterface/tpls/Confirmation.tpl | 14 +++++++++++++- indico/MaKaC/webinterface/wcomponents.py | 3 ++- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/indico/MaKaC/webinterface/pages/conferences.py b/indico/MaKaC/webinterface/pages/conferences.py index 5c9d5ff5f..910accd34 100644 --- a/indico/MaKaC/webinterface/pages/conferences.py +++ b/indico/MaKaC/webinterface/pages/conferences.py @@ -3318,7 +3318,7 @@ class WPConfCloneConfirm( WPConfModifToolsBase ): for key in params.keys(): url.addParam(key,params[key]) return wc.getHTML( msg, \ - url, {}, \ + url, {}, True, \ confirmButtonCaption= _("Yes"), cancelButtonCaption= _("No") ) #--------------------------------------------------------------------------- diff --git a/indico/MaKaC/webinterface/rh/conferenceModif.py b/indico/MaKaC/webinterface/rh/conferenceModif.py index b4c428e48..bcecfbe83 100644 --- a/indico/MaKaC/webinterface/rh/conferenceModif.py +++ b/indico/MaKaC/webinterface/rh/conferenceModif.py @@ -2025,7 +2025,7 @@ class RHConfPerformCloning( RoomBookingDBMixin, RHConferenceModifBase, Observabl #we notify the event in case any plugin wants to add their options self._notify('fillCloneDict', {'options': options, 'paramNames': paramNames}) if self._cancel: - self._redirect( urlHandlers.UHConfModifTools.getURL( self._conf ) ) + self._redirect( urlHandlers.UHConfClone.getURL( self._conf ) ) elif self._confirm: if self._cloneType == "once" : newConf = self._conf.clone( self._date, options, userPerformingClone = self._aw._currentUser ) diff --git a/indico/MaKaC/webinterface/tpls/Confirmation.tpl b/indico/MaKaC/webinterface/tpls/Confirmation.tpl index 20a2b86fb..f3cf906cb 100644 --- a/indico/MaKaC/webinterface/tpls/Confirmation.tpl +++ b/indico/MaKaC/webinterface/tpls/Confirmation.tpl @@ -1,5 +1,5 @@
-
+
${ passingArgs } @@ -19,3 +19,15 @@
+ + diff --git a/indico/MaKaC/webinterface/wcomponents.py b/indico/MaKaC/webinterface/wcomponents.py index 4d21ff3f4..08836a69d 100644 --- a/indico/MaKaC/webinterface/wcomponents.py +++ b/indico/MaKaC/webinterface/wcomponents.py @@ -2677,7 +2677,7 @@ class WSignIn(WTemplated): class WConfirmation(WTemplated): - def getHTML( self, message, postURL, passingArgs, **opts): + def getHTML( self, message, postURL, passingArgs, loading=False, **opts): params = {} params["message"] = message params["postURL"] = postURL @@ -2688,6 +2688,7 @@ class WConfirmation(WTemplated): for value in passingArgs[arg]: pa.append(""""""%( arg, value )) params["passingArgs"] = "".join(pa) + params["loading"] = loading params["confirmButtonCaption"]=opts.get("confirmButtonCaption", _("OK")) params["cancelButtonCaption"]=opts.get("cancelButtonCaption", _("Cancel")) params["systemIconWarning"] = Configuration.Config.getInstance().getSystemIconURL( "warning" ) -- 2.11.4.GIT