diff --git a/controller/Users.py b/controller/Users.py index cbb5f72..2510f62 100644 --- a/controller/Users.py +++ b/controller/Users.py @@ -459,10 +459,8 @@ class Users( object ): server.sendmail( message[ u"from" ], [ email_address ], message.as_string() ) server.quit() - # FIXME: this should really be "message =" instead of "error =" since it's not an error, but at - # least this gets it displayed on the client yield dict( - error = u"Please check your inbox. A password reset email has been sent to %s" % email_address, + message = u"Please check your inbox. A password reset email has been sent to %s" % email_address, ) @expose( view = Main_page ) diff --git a/static/js/Invoker.js b/static/js/Invoker.js index f29787f..00af342 100644 --- a/static/js/Invoker.js +++ b/static/js/Invoker.js @@ -70,6 +70,9 @@ Invoker.prototype.handle_response = function ( request, callback ) { if ( result.error ) signal( this, "error_message", result.error ); + if ( result.message ) + signal( this, "message", result.message ); + if ( callback ) callback( result ); diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 1441009..64e14ae 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -16,6 +16,7 @@ function Wiki( invoker ) { this.storage_usage_high = false; connect( this.invoker, "error_message", this, "display_error" ); + connect( this.invoker, "message", this, "display_message" ); connect( "search_form", "onsubmit", this, "search" ); connect( "search_button", "onclick", this, "toggle_search_options" ); connect( "html", "onclick", this, "background_clicked" );