From 1e4e67846244a51fc41a4f353906c2b5cc2c8cb2 Mon Sep 17 00:00:00 2001 From: Logan Hanks Date: Thu, 21 Feb 2013 16:55:04 -0800 Subject: [PATCH] Fix permission control in the moderator invitation form. --- r2/r2/public/static/js/ui.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/r2/r2/public/static/js/ui.js b/r2/r2/public/static/js/ui.js index 634e281b9..d8f3f0e4b 100644 --- a/r2/r2/public/static/js/ui.js +++ b/r2/r2/public/static/js/ui.js @@ -325,6 +325,11 @@ r.ui.PermissionEditor.prototype = $.extend(new r.ui.Base(), { hide: function() { if (this.$menu) { + if (this.embedded) { + this.original_perms = this._getNewPerms() + this.$permissions_field + .val(this._serializePerms(this.original_perms)) + } this.$menu.remove() this.$menu = null this.updateSummary()