From 5161891fbddd3a47f30cfaef752f7dcbd2fc9518 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 28 Oct 2015 09:40:30 -0700 Subject: [PATCH] admin: Fix reactivating bot users. Because the `owner` field had the class email, we were sending the concatination of the user and owner email addresses as the email address in the reactivate requests. Fixes #243. --- static/js/admin.js | 2 +- static/templates/admin_user_list.handlebars | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/admin.js b/static/js/admin.js index 21a2c80a7f..004bf398a4 100644 --- a/static/js/admin.js +++ b/static/js/admin.js @@ -151,7 +151,7 @@ exports.setup_page = function () { var email = $(".active_user_row").find('.email').text(); channel.post({ - url: '/json/users/' + $(".active_user_row").find('.email').text() + "/reactivate", + url: '/json/users/' + email + "/reactivate", error: function (xhr, error_type) { if (xhr.status.toString().charAt(0) === "4") { $(".active_user_row button").closest("td").html( diff --git a/static/templates/admin_user_list.handlebars b/static/templates/admin_user_list.handlebars index f7fdfa397d..9ef9480628 100644 --- a/static/templates/admin_user_list.handlebars +++ b/static/templates/admin_user_list.handlebars @@ -8,7 +8,7 @@ {{#if is_bot}} - {{bot_owner}} + {{bot_owner}} {{/if}}