Ticket #1475: sage-1475_1.patch
| File sage-1475_1.patch, 2.0 kB (added by TimothyClemans, 4 months ago) |
|---|
-
a/sage/server/notebook/twist.py
old new 855 855 notebook.user(self.username)['autosave_interval'] = int(request.args['autosave'][0]) * 60 856 856 redirect_to_home = True 857 857 858 if 'pretty_print' in request.args: 859 notebook.user(self.username)['default_pretty_print'] = bool(request.args['pretty_print'][0]) 860 redirect_to_home = True 861 858 862 if 'Newpass' in request.args or 'RetypePass' in request.args: 859 863 if not 'Oldpass' in request.args: 860 864 error = 'Old password not given' … … 870 874 if not error: #webbrowser may auto fill in "old password" even though the user may not want to change her password 871 875 notebook.change_password(self.username, request.args['Newpass'][0]) 872 876 redirect_to_logout = True 877 873 878 if notebook.conf()['email']: 874 879 if 'Newemail' in request.args: 875 880 notebook.user(self.username).set_email(request.args['Newemail'][0]) … … 885 890 return http.RedirectResponse('/home/%s' % self.username) 886 891 887 892 template_dict = {} 893 template_dict['username'] = self.username 888 894 template_dict['autosave_intervals'] = ((i, ' selected') if notebook.user(self.username)['autosave_interval']/60 == i else (i, '') for i in range(1, 10, 2)) 895 template_dict['pretty_print'] = notebook.user(self.username)['default_pretty_print'] 889 896 template_dict['email'] = notebook.conf()['email'] 890 897 if template_dict['email']: 891 898 template_dict['email_address'] = 'None' if not notebook.user(self.username)._User__email else notebook.user(self.username)._User__email