From 243c0ca70dd8b09abc0bcb404b3d3725592ade27 Mon Sep 17 00:00:00 2001 From: rochecompaan Date: Fri, 30 Nov 2001 20:47:58 +0000 Subject: [PATCH] Links in page header are now consistent with default sort order. Fixed bugs: - When login failed the list of issues were still rendered. - User was redirected to index page and not to his destination url if his first login attempt failed. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@441 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/cgi_client.py | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/roundup/cgi_client.py b/roundup/cgi_client.py index 02560d9..66c923a 100644 --- a/roundup/cgi_client.py +++ b/roundup/cgi_client.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: cgi_client.py,v 1.71 2001-11-30 20:28:10 rochecompaan Exp $ +# $Id: cgi_client.py,v 1.72 2001-11-30 20:47:58 rochecompaan Exp $ __doc__ = """ WWW request handler (also used in the stand-alone server). @@ -111,7 +111,7 @@ class Client: if self.user not in (None, 'anonymous'): userid = self.db.user.lookup(self.user) user_info = _(''' -My Issues | +My Issues | My Details | Logout ''')%locals() else: @@ -135,9 +135,9 @@ class Client: %(user_name)s All -Issues +Issues | Unassigned -Issues +Issues %(add_links)s %(admin_links)s %(user_info)s @@ -634,7 +634,7 @@ class Client: if self.user is None and self.ANONYMOUS_REGISTER == 'deny': self.write('') self.pagefoot() - return + return 1 values = {'realname': '', 'organisation': '', 'address': '', 'phone': '', 'username': '', 'password': '', 'confirm': ''} if newuser_form is not None: @@ -680,13 +680,16 @@ class Client: except KeyError: name = self.user self.make_user_anonymous() - return self.login(message=_('No such user "%(name)s"')%locals()) + action = self.form['__destination_url'].value + return self.login(message=_('No such user "%(name)s"')%locals(), + action=action) # and that the password is correct pw = self.db.user.get(uid, 'password') if password != self.db.user.get(uid, 'password'): self.make_user_anonymous() - return self.login(message=_('Incorrect password')) + action = self.form['__destination_url'].value + return self.login(message=_('Incorrect password'), action=action) self.set_cookie(self.user, password) return None # make it explicit @@ -914,8 +917,8 @@ class ExtendedClient(Client): if self.user not in (None, 'anonymous'): userid = self.db.user.lookup(self.user) user_info = _(''' -My Issues | -My Support | +My Issues | +My Support | My Details | Logout ''')%locals() else: @@ -943,8 +946,8 @@ class ExtendedClient(Client): Issues, Support | Unassigned -Issues, -Support +Issues, +Support %(add_links)s %(admin_links)s %(user_info)s @@ -1024,6 +1027,10 @@ def parsePropsFromForm(db, cl, form, nodeid=0): # # $Log: not supported by cvs2svn $ +# Revision 1.71 2001/11/30 20:28:10 rochecompaan +# Property changes are now completely traceable, whether changes are +# made through the web or by email +# # Revision 1.70 2001/11/30 00:06:29 richard # Converted roundup/cgi_client.py to use _() # Added the status file, I18N_PROGRESS.txt -- 2.30.2