# HG changeset patch # User Marcin Kuzminski # Date 1279925517 -7200 # Node ID 339d1368c10d0faae153021c9fa8cd5deb5c7b04 # Parent 23e720be5f4427830c80b332ed21e6b2b747464c new style error display for settings, added flash msg for repo rescan diff -r 23e720be5f44 -r 339d1368c10d pylons_app/controllers/admin/settings.py --- a/pylons_app/controllers/admin/settings.py Sat Jul 24 00:50:41 2010 +0200 +++ b/pylons_app/controllers/admin/settings.py Sat Jul 24 00:51:57 2010 +0200 @@ -2,7 +2,7 @@ # encoding: utf-8 # settings controller for pylons # Copyright (C) 2009-2010 Marcin Kuzminski - +# # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 @@ -94,6 +94,7 @@ initial = HgModel.repo_scan(g.paths[0][0], g.paths[0][1], g.baseui) repo2db_mapper(initial, rm_obsolete) invalidate_cache('cached_repo_list') + h.flash(_('Repositories sucessfully rescanned'), category='success') if id == 'global': @@ -123,24 +124,15 @@ except formencode.Invalid as errors: - c.form_errors = errors.error_dict return htmlfill.render( render('admin/settings/settings.html'), - defaults=errors.value, - encoding="UTF-8") + defaults=errors.value, + errors=errors.error_dict or {}, + prefix_error=False, + encoding="UTF-8") - - - - - - return redirect(url('admin_settings')) - - - - def delete(self, id): """DELETE /admin/settings/id: Delete an existing item""" # Forms posted to this method should contain a hidden field: