From 32847ed4f73d3b88b2ee5802af46fb5bb76c90bc Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sat, 28 Jul 2012 01:00:57 -0500 Subject: [PATCH] FORM.dialog -> FORM.confirm --- VERSION | 2 +- applications/admin/controllers/default.py | 8 ++++---- gluon/html.py | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index e31700df..e8e898f2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-07-28 00:56:00) dev +Version 2.00.0 (2012-07-28 01:00:54) dev diff --git a/applications/admin/controllers/default.py b/applications/admin/controllers/default.py index 8929034d..8468d33a 100644 --- a/applications/admin/controllers/default.py +++ b/applications/admin/controllers/default.py @@ -317,7 +317,7 @@ def pack_plugin(): redirect(URL('plugin',args=request.args)) def upgrade_web2py(): - dialog = FORM.dialog(T('Upgrade'), + dialog = FORM.confim(T('Upgrade'), {T('Cancel'):URL('site')}) if dialog.accepted: (success, error) = upgrade(request) @@ -331,7 +331,7 @@ def upgrade_web2py(): def uninstall(): app = get_app() - dialog = FORM.dialog(T('Uninstall'), + dialog = FORM.confim(T('Uninstall'), {T('Cancel'):URL('site')}) if dialog.accepted: @@ -414,7 +414,7 @@ def delete(): if isinstance(sender, list): # ## fix a problem with Vista sender = sender[0] - dialog = FORM.dialog(T('Delete'), + dialog = FORM.confim(T('Delete'), {T('Cancel'):URL(sender, anchor=request.vars.id)}) if dialog.accepted: @@ -981,7 +981,7 @@ def delete_plugin(): plugin = request.args(1) plugin_name='plugin_'+plugin - dialog = FORM.dialog( + dialog = FORM.confim( T('Delete'), {T('Cancel'):URL('design', args=app)}) diff --git a/gluon/html.py b/gluon/html.py index 3776f67b..151626b9 100644 --- a/gluon/html.py +++ b/gluon/html.py @@ -2041,8 +2041,9 @@ class FORM(DIV): _onclick=self.REDIRECT_JS % url)) + @staticmethod - def dialog(text='OK',buttons=None,hidden=None): + def confim(text='OK',buttons=None,hidden=None): if not buttons: buttons = {} if not hidden: hidden={} inputs = [INPUT(_type='button',