You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2018/03/29 20:27:47 UTC

[1/2] allura git commit: [#8196] Better handle inputs that are hidden initially; additional clarifying comments

Repository: allura
Updated Branches:
  refs/heads/master 78fefa845 -> 8c81519b2


[#8196] Better handle inputs that are hidden initially; additional clarifying comments


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/8c81519b
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/8c81519b
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/8c81519b

Branch: refs/heads/master
Commit: 8c81519b26fee6ebac28e00f9d314c016f97e6f5
Parents: 0e48d60
Author: Kenton Taylor <kt...@slashdotmedia.com>
Authored: Wed Mar 28 15:34:57 2018 -0400
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Mar 29 20:27:33 2018 +0000

----------------------------------------------------------------------
 Allura/allura/controllers/discuss.py            |  1 +
 Allura/allura/lib/widgets/discuss.py            |  1 +
 .../lib/widgets/resources/js/sf_markitup.js     |  1 -
 Allura/allura/public/nf/js/memorable.js         | 20 ++++++++++++++++----
 4 files changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/8c81519b/Allura/allura/controllers/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/discuss.py b/Allura/allura/controllers/discuss.py
index d1a798f..b91e213 100644
--- a/Allura/allura/controllers/discuss.py
+++ b/Allura/allura/controllers/discuss.py
@@ -340,6 +340,7 @@ class PostController(BaseController):
     def error_handler(self, *args, **kwargs):
         redirect(request.referer)
 
+    @memorable_forget()
     @h.vardec
     @expose()
     @require_post()

http://git-wip-us.apache.org/repos/asf/allura/blob/8c81519b/Allura/allura/lib/widgets/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/discuss.py b/Allura/allura/lib/widgets/discuss.py
index 7afdac4..ac76da9 100644
--- a/Allura/allura/lib/widgets/discuss.py
+++ b/Allura/allura/lib/widgets/discuss.py
@@ -393,6 +393,7 @@ class Post(HierWidget):
                         var cm = get_cm($reply_post_form);
                         $reply_post_form.show();
                         cm.focus();
+                        $('form', $reply_post_form).trigger('replyRevealed');
                     });
                 }
                 if($('.add_attachment', post)){

http://git-wip-us.apache.org/repos/asf/allura/blob/8c81519b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/sf_markitup.js b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
index 3c99caa..cfc7c3f 100644
--- a/Allura/allura/lib/widgets/resources/js/sf_markitup.js
+++ b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
@@ -57,7 +57,6 @@ $(window).load(function() {
               autofocus: false,
               spellChecker: false, // https://forge-allura.apache.org/p/allura/tickets/7954/
               indentWithTabs: false,
-              autosave: true,
               tabSize: 4,
               toolbar: toolbar,
               previewRender: previewRender,

http://git-wip-us.apache.org/repos/asf/allura/blob/8c81519b/Allura/allura/public/nf/js/memorable.js
----------------------------------------------------------------------
diff --git a/Allura/allura/public/nf/js/memorable.js b/Allura/allura/public/nf/js/memorable.js
index a9000a0..70f9c32 100644
--- a/Allura/allura/public/nf/js/memorable.js
+++ b/Allura/allura/public/nf/js/memorable.js
@@ -7,8 +7,11 @@ window.Memorable = {};
 Memorable.InputManager = (function(){
 
     var defaults = {
+        // regex to determine if an input's name can't reliably identify it, as many inputs have randomized
+        // names for antispam purposes.
         invalidInputName: /([A-Za-z0-9\-_]{28})/,
-        cancelSelectors: '.cancel_edit_post, .cancel_form'
+        // selectors of buttons that represent a user cancellation, and will clear remembered inputs in the form
+        cancelSelectors: '.cancel_edit_post, .cancel_form, input[value=Cancel]'
     };
 
     /**
@@ -17,7 +20,6 @@ Memorable.InputManager = (function(){
      */
     function InputManager(inputObj, options){
         this.options = $.extend({}, defaults, options);
-
         this.inputObj = inputObj;
         this.$form = this.inputObj.getForm();
 
@@ -26,6 +28,11 @@ Memorable.InputManager = (function(){
 
         //watch "cancel"-style links, to forget immediately
         $(this.options.cancelSelectors, this.$form).on('click', this.handleCancel.bind(this));
+
+        //watch for hidden inputs that might be revealed
+        this.$form.on('replyRevealed', this.inputObj.refresh.bind(this.inputObj));
+
+        //restore from localStorage
         this.restore();
     }
 
@@ -125,7 +132,6 @@ Memorable.InputManager = (function(){
         this.inputObj.setValue(this.storedValue());
     };
 
-
     return InputManager;
 })();
 
@@ -159,6 +165,9 @@ Memorable.InputBasic = (function() {
     InputBasic.prototype.getForm = function () {
         return this.$el.parents('form').eq(0);
     };
+    InputBasic.prototype.refresh = function(){
+        return null;  // noop
+    };
     return InputBasic;
 })();
 
@@ -192,6 +201,9 @@ Memorable.InputMDE = (function() {
     InputMDE.prototype.getForm = function () {
         return this.$el.parents('form').eq(0);
     };
+    InputMDE.prototype.refresh = function(){
+        this.watchObj.refresh();
+    };
     return InputMDE;
 })();
 
@@ -250,4 +262,4 @@ Memorable.add = function(obj){
 
 
 // Initialize
-$(function(){Memorable.initialize();});
\ No newline at end of file
+$(function(){Memorable.initialize();});


[2/2] allura git commit: [#8196] Remember text in large form inputs before submitting

Posted by br...@apache.org.
[#8196] Remember text in large form inputs before submitting


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/0e48d601
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/0e48d601
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/0e48d601

Branch: refs/heads/master
Commit: 0e48d601b650414e98a34e20abf51de0114ceb65
Parents: 78fefa8
Author: Kenton Taylor <kt...@slashdotmedia.com>
Authored: Wed Mar 14 14:35:48 2018 -0400
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Mar 29 20:27:33 2018 +0000

----------------------------------------------------------------------
 Allura/allura/controllers/discuss.py            |   9 +-
 Allura/allura/lib/decorators.py                 |  50 ++++
 Allura/allura/lib/plugin.py                     |   1 +
 Allura/allura/lib/widgets/form_fields.py        |   1 -
 .../lib/widgets/resources/js/sf_markitup.js     |   4 +-
 Allura/allura/public/nf/js/memorable.js         | 253 +++++++++++++++++++
 .../allura/templates/jinja_master/master.html   |   2 +
 ForgeBlog/forgeblog/main.py                     |   4 +-
 .../forgediscussion/controllers/root.py         |   3 +-
 ForgeTracker/forgetracker/tracker_main.py       |   4 +-
 .../forgetracker/widgets/ticket_form.py         |   2 +-
 ForgeWiki/forgewiki/wiki_main.py                |   3 +-
 12 files changed, 326 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/0e48d601/Allura/allura/controllers/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/discuss.py b/Allura/allura/controllers/discuss.py
index 100ce44..d1a798f 100644
--- a/Allura/allura/controllers/discuss.py
+++ b/Allura/allura/controllers/discuss.py
@@ -19,8 +19,10 @@ from urllib import unquote
 from datetime import datetime
 import logging
 
-from tg import expose, redirect, validate, request, flash
-from tg.decorators import with_trailing_slash
+from tg import expose, redirect, validate, request, flash, response
+from tg.decorators import with_trailing_slash, before_render, before_validate
+from decorator import decorator
+
 from pylons import tmpl_context as c, app_globals as g
 from webob import exc
 
@@ -32,7 +34,7 @@ from allura import model as M
 from base import BaseController
 from allura.lib import utils
 from allura.lib import helpers as h
-from allura.lib.decorators import require_post
+from allura.lib.decorators import require_post, memorable_forget
 from allura.lib.security import require_access
 
 from allura.lib.widgets import discuss as DW
@@ -202,6 +204,7 @@ class ThreadController(BaseController, FeedController):
     def error_handler(self, *args, **kwargs):
         redirect(request.referer)
 
+    @memorable_forget()
     @h.vardec
     @expose()
     @require_post()

http://git-wip-us.apache.org/repos/asf/allura/blob/0e48d601/Allura/allura/lib/decorators.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/decorators.py b/Allura/allura/lib/decorators.py
index 70e5833..4e1135c 100644
--- a/Allura/allura/lib/decorators.py
+++ b/Allura/allura/lib/decorators.py
@@ -32,6 +32,8 @@ from tg import request, redirect, session, config
 from tg.render import render
 from webob import exc
 from pylons import tmpl_context as c
+from pylons import response
+from webob.exc import HTTPFound, WSGIHTTPException
 
 from allura.lib import helpers as h
 from allura.lib import utils
@@ -246,3 +248,51 @@ def memoize(func, *args):
         result = func(*args)
         dic[args] = result
         return result
+
+
+def memorable_forget():
+    """
+    Decorator to mark a controller action as needing to "forget" remembered input values on the next
+    page render, if we detect that the form post was processed successfully
+    """
+
+    def _ok_to_forget(response, controller_result, raised):
+        """
+        Look for signals that say it's probably ok to forget remembered inputs for the current form.
+        Checks here will need to be expanded for controller actions that behave differently
+        than others upon successful processing of their particular request
+        """
+        # if there is a flash message with type "ok", then we can forget.
+        if response.headers:
+            set_cookie = response.headers.get('Set-Cookie', '')
+            if 'status%22%3A%20%22ok' in set_cookie:
+                return True
+
+        # if the controller raised a 302, we can assume the value will be remembered by the app
+        # if needed, and forget.
+        if raised and isinstance(raised, HTTPFound):
+            return True
+
+        return False
+
+    def forget(controller_result, raised=None):
+        """
+        Check if the form's inputs can be forgotten, and set the cookie to forget if so.
+        :param res: the result of the controller action
+        :param raised: any error (redirect or exception) raised by the controller action
+        """
+        if _ok_to_forget(response, controller_result, raised):
+            response.set_cookie('memorable_forget', request.path)
+
+    @decorator
+    def _inner(func, *args, **kwargs):
+        res, raised = (None, None)
+        try:
+            res = func(*args, **kwargs)
+            forget(res)
+            return res
+        except WSGIHTTPException as ex:
+            forget(None, ex)
+            raise ex
+
+    return _inner
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/allura/blob/0e48d601/Allura/allura/lib/plugin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index f7b6fed..ee2cfe7 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -215,6 +215,7 @@ class AuthenticationProvider(object):
         self.session.invalidate()
         self.session.save()
         response.delete_cookie('allura-loggedin')
+        response.set_cookie('memorable_forget', '/')
 
     def validate_password(self, user, password):
         '''Check that provided password matches actual user password

http://git-wip-us.apache.org/repos/asf/allura/blob/0e48d601/Allura/allura/lib/widgets/form_fields.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/form_fields.py b/Allura/allura/lib/widgets/form_fields.py
index 52d7e10..900e46e 100644
--- a/Allura/allura/lib/widgets/form_fields.py
+++ b/Allura/allura/lib/widgets/form_fields.py
@@ -281,7 +281,6 @@ class MarkdownEdit(ew.TextArea):
         yield ew.JSLink('js/simplemde.min.js')
         yield ew.JSLink('js/sf_markitup.js')
 
-
 class PageList(ew_core.Widget):
     template = 'jinja:allura:templates/widgets/page_list.html'
     defaults = dict(

http://git-wip-us.apache.org/repos/asf/allura/blob/0e48d601/Allura/allura/lib/widgets/resources/js/sf_markitup.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/sf_markitup.js b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
index 1e9a69d..3c99caa 100644
--- a/Allura/allura/lib/widgets/resources/js/sf_markitup.js
+++ b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
@@ -17,7 +17,7 @@
        under the License.
 */
 
-/*global SimpleMDE, _replaceSelection */
+/*global SimpleMDE, _replaceSelection, Memorable */
 $(window).load(function() {
     if(!window.markdown_init){
         window.markdown_init = true;
@@ -57,6 +57,7 @@ $(window).load(function() {
               autofocus: false,
               spellChecker: false, // https://forge-allura.apache.org/p/allura/tickets/7954/
               indentWithTabs: false,
+              autosave: true,
               tabSize: 4,
               toolbar: toolbar,
               previewRender: previewRender,
@@ -74,6 +75,7 @@ $(window).load(function() {
                   "toggleUnorderedList": null, // default is cmd-l, used to activate location bar
               }
             });
+            Memorable.add(editor);
             // https://github.com/codemirror/CodeMirror/issues/1576#issuecomment-19146595
             // can't use simplemde's shortcuts settings, since those only hook into bindings set up for each button
             editor.codemirror.options.extraKeys.Home = "goLineLeft";

http://git-wip-us.apache.org/repos/asf/allura/blob/0e48d601/Allura/allura/public/nf/js/memorable.js
----------------------------------------------------------------------
diff --git a/Allura/allura/public/nf/js/memorable.js b/Allura/allura/public/nf/js/memorable.js
new file mode 100644
index 0000000..a9000a0
--- /dev/null
+++ b/Allura/allura/public/nf/js/memorable.js
@@ -0,0 +1,253 @@
+/*global $, console, jQuery, localStorage */
+window.Memorable = {};
+
+/**
+ * Class that describes the management of a memorable input - identifying, watching, saving, and restoring
+ */
+Memorable.InputManager = (function(){
+
+    var defaults = {
+        invalidInputName: /([A-Za-z0-9\-_]{28})/,
+        cancelSelectors: '.cancel_edit_post, .cancel_form'
+    };
+
+    /**
+     * @param inputObj - the InputBasic or InputMDE object representing the input to be tracked
+     * @constructor
+     */
+    function InputManager(inputObj, options){
+        this.options = $.extend({}, defaults, options);
+
+        this.inputObj = inputObj;
+        this.$form = this.inputObj.getForm();
+
+        //watch the Input object for change
+        this.inputObj.watchObj.on(this.inputObj.watchEvent, this.handleSave.bind(this));
+
+        //watch "cancel"-style links, to forget immediately
+        $(this.options.cancelSelectors, this.$form).on('click', this.handleCancel.bind(this));
+        this.restore();
+    }
+
+    /**
+     * Builds a unique key to use when persisting the input's value
+     * @returns {string}
+     */
+    InputManager.prototype.getStorageKey = function(){
+        var self = this;
+        function isUsableName($el){
+            var name = $el.attr('name');
+            if (name && !name.match(self.options.invalidInputName)){
+                return true;
+            }
+        }
+        function getRelativeAction($f){
+            var action = $f[0].action;
+            var list = action.split('/');
+            var relativeAction = "/" + list.slice(3).join('/');
+            return relativeAction;
+        }
+
+        var key = '';
+        var $f = this.$form;
+        var keySeparator = '__';
+        if ($f.attr('action')){
+            var relativeAction = getRelativeAction($f);
+            key += relativeAction;
+        }
+        if (isUsableName(this.inputObj.$el)) {
+            key += keySeparator + this.inputObj.$el.attr('name');
+        } else if (this.inputObj.$el.attr('class')) {
+            // id can't be relied upon, because of EW.  We can key off class, if it's the only one in the form.
+            var klass = this.inputObj.$el.attr('class');
+            if ($('.' + klass, $f).length == 1) {
+                key += keySeparator + klass;
+            } else {
+                throw "Element isn't memorable, it has no unique class";
+            }
+        } else {
+            throw "Element isn't memorable, it has no identifiable traits";
+        }
+        return key;
+    };
+
+    /**
+     * Gets the value of the tracked input field
+     */
+    InputManager.prototype.getValue = function(){
+        return this.inputObj.getValue();
+    };
+
+    /**
+     * Saves the input's value to local storage, and registers it as part of the form for later removal
+     */
+    InputManager.prototype.save = function(){
+        localStorage[this.getStorageKey()] = this.getValue();
+    };
+
+    /**
+     * Event handler for invoking the save
+     * @param e
+     * @returns {boolean}
+     */
+    InputManager.prototype.handleSave = function(e){
+        if (e.preventDefault){
+            e.preventDefault();
+        }
+        this.save();
+        return false;
+    };
+
+    /**
+     * Event handler for clicking "cancel"
+     * @param e
+     * @returns {boolean}
+     */
+    InputManager.prototype.handleCancel = function(e){
+        Memorable.forget(this.getStorageKey());
+        return true;
+    };
+    /**
+     * Fetches the tracked input's persisted value from storage
+     * @returns {string}
+     */
+    InputManager.prototype.storedValue = function(){
+        return localStorage[this.getStorageKey()];
+    };
+
+    /**
+     * Fetches the input's remembered value and restores it to the target field
+     */
+    InputManager.prototype.restore = function(){
+        if (!this.storedValue()){
+            return;
+        }
+        this.inputObj.setValue(this.storedValue());
+    };
+
+
+    return InputManager;
+})();
+
+
+/**
+ * Class describing a simple input field, as identified by a selector or DOM element, with specific methods for
+ * getting & setting the value, and finding it's parent form
+ *
+ * @property obj: the raw object representing the field to be tracked; a standard jquery object
+ * @property watchEvent: the name of the event to watch to detect when changes have been made
+ * @property watchObj: the object instance to watch for events on. same as this.obj
+ * @property $el: the jquery object representing the actual input field on the page. same as this.obj
+ */
+Memorable.InputBasic = (function() {
+    /**
+     * @param obj: a selector or DOM Element identifying the basic input field to be remembered
+     * @constructor
+     */
+    function InputBasic(obj) {
+        this.obj = $(obj);
+        this.watchEvent = 'change';
+        this.watchObj = this.obj;
+        this.$el = this.obj;
+    }
+    InputBasic.prototype.getValue = function () {
+        return this.obj.val();
+    };
+    InputBasic.prototype.setValue = function (val) {
+        this.$el.val(val);
+    };
+    InputBasic.prototype.getForm = function () {
+        return this.$el.parents('form').eq(0);
+    };
+    return InputBasic;
+})();
+
+
+/**
+ * Class describing a field backed by SimpleMDE, as identified by the passed instance of `SimpleMDE` provided, with specific methods for
+ * getting & setting the value, and finding it's parent form
+ *
+ * @property obj: the SimpleMDE object describing the field to be tracked
+ * @property watchEvent: the name of the event to watch to detect when changes have been made
+ * @property watchObj: the object instance to watch for events on; editor.codemirror per their docs
+ * @property $el: the jquery object representing the actual input field on the page
+ */
+Memorable.InputMDE = (function() {
+    /**
+     * @param obj: A SimpleMDE object representing the input field
+     * @constructor
+     */
+    function InputMDE(obj) {
+        this.obj = obj;
+        this.watchEvent = 'change';
+        this.watchObj = this.obj.codemirror;
+        this.$el= $(this.obj.element);
+    }
+    InputMDE.prototype.getValue = function () {
+        return this.obj.value();
+    };
+    InputMDE.prototype.setValue = function (val) {
+        this.obj.value(val);
+    };
+    InputMDE.prototype.getForm = function () {
+        return this.$el.parents('form').eq(0);
+    };
+    return InputMDE;
+})();
+
+
+/**
+ * Takes an arbitrary object, and determines the best Input class to represent it
+ */
+Memorable.inputFactory = function(obj) {
+    if (obj.codemirror){
+        return Memorable.InputMDE;
+    } else {
+        return Memorable.InputBasic;
+    }
+};
+
+
+/**
+ * Convenience method to find any classes decorated with `.memorable` and create a related Input object for it
+ * @param selector - use to override the selector used to find all fields to be remembered
+ */
+Memorable.initialize = function(selector){
+    Memorable.forget();
+    var s = selector || '.memorable';
+    Memorable.items = [];
+    $(s).each(function(){
+        Memorable.add(this);
+    });
+};
+
+
+/**
+ * Forgets any successfully processed inputs from user
+ */
+Memorable.forget = function(key_prefix){
+    key_prefix = key_prefix || $.cookie('memorable_forget');
+    if (key_prefix) {
+        for (var i = localStorage.length -1; i >=0; i--) {
+            if(localStorage.key(i).indexOf(key_prefix) == 0){
+                localStorage.removeItem(localStorage.key(i));
+            }
+        }
+        $.removeCookie('memorable_forget', { path: '/' });
+    }
+};
+
+
+
+/**
+ * Creates a new Input object to remember changes to an individual field
+ * @param obj - the raw object representing the field to be tracked
+ */
+Memorable.add = function(obj){
+    var cls = Memorable.inputFactory(obj);
+    Memorable.items.push(new Memorable.InputManager(new cls(obj)));
+};
+
+
+// Initialize
+$(function(){Memorable.initialize();});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/allura/blob/0e48d601/Allura/allura/templates/jinja_master/master.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/jinja_master/master.html b/Allura/allura/templates/jinja_master/master.html
index c9e185a..9c6962e 100644
--- a/Allura/allura/templates/jinja_master/master.html
+++ b/Allura/allura/templates/jinja_master/master.html
@@ -40,6 +40,7 @@
        any css.  (Unlike other html files which are the top-level file and extend this master.html) #}
     {% do g.register_forge_css('css/navbar.css') %}
 {% endif %}
+{% do g.register_forge_js('js/memorable.js') %}
 {% do g.resource_manager.register_widgets(c) %}
 {# paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ #}
 <!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
@@ -186,6 +187,7 @@
         }).blur(function () {
             $(this).tooltipster('hide');
         });
+
     });
 </script>
 </body>

http://git-wip-us.apache.org/repos/asf/allura/blob/0e48d601/ForgeBlog/forgeblog/main.py
----------------------------------------------------------------------
diff --git a/ForgeBlog/forgeblog/main.py b/ForgeBlog/forgeblog/main.py
index 578432c..657ba17 100644
--- a/ForgeBlog/forgeblog/main.py
+++ b/ForgeBlog/forgeblog/main.py
@@ -40,7 +40,7 @@ from allura.app import DefaultAdminController
 from allura.lib import helpers as h
 from allura.lib.utils import JSONForExport
 from allura.lib.search import search_app
-from allura.lib.decorators import require_post
+from allura.lib.decorators import require_post, memorable_forget
 from allura.lib.security import has_access, require_access
 from allura.lib import widgets as w
 from allura.lib import exceptions as forge_exc
@@ -291,6 +291,7 @@ class RootController(BaseController, FeedController):
         c.form = W.new_post_form
         return dict(post=post)
 
+    @memorable_forget()
     @expose()
     @require_post()
     @validate(form=W.edit_post_form, error_handler=new)
@@ -386,6 +387,7 @@ class PostController(BaseController, FeedController):
         result = h.diff_text(p1.text, p2.text)
         return dict(p1=p1, p2=p2, edits=result)
 
+    @memorable_forget()
     @expose()
     @require_post()
     @validate(form=W.edit_post_form, error_handler=edit)

http://git-wip-us.apache.org/repos/asf/allura/blob/0e48d601/ForgeDiscussion/forgediscussion/controllers/root.py
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/forgediscussion/controllers/root.py b/ForgeDiscussion/forgediscussion/controllers/root.py
index 176156f..641e757 100644
--- a/ForgeDiscussion/forgediscussion/controllers/root.py
+++ b/ForgeDiscussion/forgediscussion/controllers/root.py
@@ -35,7 +35,7 @@ from allura.lib.security import require_access, has_access, require_authenticate
 from allura.lib.search import search_app
 from allura.lib import helpers as h
 from allura.lib.utils import AntiSpam
-from allura.lib.decorators import require_post
+from allura.lib.decorators import require_post, memorable_forget
 from allura.controllers import BaseController, DispatchIndex
 from allura.controllers.rest import AppRestControllerMixin
 from allura.controllers.feed import FeedArgs, FeedController
@@ -117,6 +117,7 @@ class RootController(BaseController, DispatchIndex, FeedController):
                 my_forums.append(f)
         return dict(forums=my_forums, current_forum=current_forum)
 
+    @memorable_forget()
     @h.vardec
     @expose()
     @require_post()

http://git-wip-us.apache.org/repos/asf/allura/blob/0e48d601/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index d08254d..869eae7 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -55,7 +55,7 @@ from allura.app import (
 )
 from allura.lib.search import search_artifact, SearchError
 from allura.lib.solr import escape_solr_arg
-from allura.lib.decorators import require_post
+from allura.lib.decorators import require_post, memorable_forget
 from allura.lib.security import (require_access, has_access, require,
                                  require_authenticated)
 from allura.lib import widgets as w
@@ -916,6 +916,7 @@ class RootController(BaseController, FeedController):
         """Static page explaining markdown."""
         return dict()
 
+    @memorable_forget()
     @expose()
     @h.vardec
     @require_post()
@@ -1429,6 +1430,7 @@ class TicketController(BaseController, FeedController):
             post_data['labels'] = []
         self._update_ticket(post_data)
 
+    @memorable_forget()
     @expose()
     @require_post()
     @h.vardec

http://git-wip-us.apache.org/repos/asf/allura/blob/0e48d601/ForgeTracker/forgetracker/widgets/ticket_form.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/widgets/ticket_form.py b/ForgeTracker/forgetracker/widgets/ticket_form.py
index 476d9b3..24b97cb 100644
--- a/ForgeTracker/forgetracker/widgets/ticket_form.py
+++ b/ForgeTracker/forgetracker/widgets/ticket_form.py
@@ -101,7 +101,7 @@ class GenericTicketForm(ew.SimpleForm):
     def fields(self):
         fields = [
             ew.TextField(name='summary', label='Title',
-                         attrs={'style': 'width: 425px',
+                         attrs={'style': 'width: 425px', 'class':'memorable',
                                 'placeholder': 'Title'},
                          validator=fev.UnicodeString(
                              not_empty=True, messages={

http://git-wip-us.apache.org/repos/asf/allura/blob/0e48d601/ForgeWiki/forgewiki/wiki_main.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/wiki_main.py b/ForgeWiki/forgewiki/wiki_main.py
index 377c50c..12e2e6e 100644
--- a/ForgeWiki/forgewiki/wiki_main.py
+++ b/ForgeWiki/forgewiki/wiki_main.py
@@ -36,7 +36,7 @@ from allura import model as M
 from allura.lib import helpers as h
 from allura.app import Application, SitemapEntry, DefaultAdminController, ConfigOption
 from allura.lib.search import search_app
-from allura.lib.decorators import require_post
+from allura.lib.decorators import require_post, memorable_forget
 from allura.lib.security import require_access, has_access
 from allura.lib.utils import is_ajax, JSONForExport
 from allura.lib import exceptions as forge_exc
@@ -699,6 +699,7 @@ class PageController(BaseController, FeedController):
         self.page.commit()
         return dict(location='.')
 
+    @memorable_forget()
     @without_trailing_slash
     @h.vardec
     @expose()