From 83fc88e965ef128f25897e1a0c75b348c6e99584 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Thu, 2 Oct 2014 18:16:23 -0400 Subject: [PATCH] FIX: when site is in read-only mode, create account action should show a warning like login does. --- app/assets/javascripts/discourse/routes/application.js.es6 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/routes/application.js.es6 b/app/assets/javascripts/discourse/routes/application.js.es6 index a2058ca0c64..ae75165f696 100644 --- a/app/assets/javascripts/discourse/routes/application.js.es6 +++ b/app/assets/javascripts/discourse/routes/application.js.es6 @@ -47,7 +47,11 @@ var ApplicationRoute = Em.Route.extend({ }, showCreateAccount: function() { - this.handleShowCreateAccount(); + if (this.site.get("isReadOnly")) { + bootbox.alert(I18n.t("read_only_mode.login_disabled")); + } else { + this.handleShowCreateAccount(); + } }, autoLogin: function(modal, onFail){