Short description

This is a request to move the button bar at the end of the form in the Edit page.

Currently when editing a wiki page the form buttons appear above the text area.

Usually a user edits a page and slowly moves downwards through the form inputs. He puts a comment and now he has to return to the top to click on "Save"/"Preview". This unnecessary step even causes many users just to omit the comment box more often than if the button bar was below.

Here is a patch for PageEditor.py, which just moves the buttons-code at the bottom of the form.

(updated, see below)


Here is a patch requested to have both buttons and comment box on top:

--- PageEditorMoin.py   2007-03-25 22:50:12.000000000 +0100
+++ PageEditorUpall.py  2007-03-29 22:03:45.000000000 +0100
@@ -345,10 +345,17 @@
 %s
 <input class="button" type="submit" name="button_cancel" value="%s">
 <input type="hidden" name="editor" value="text">
 ''' % (button_spellcheck, cancel_button_text,))
 
+        self.request.write("<p>")
+        self.request.write(_("Comment:"),
+            ' <input id="editor-comment" type="text" name="comment" value="%s" maxlength="200"'
+            ' onChange="flgChange = true;" onKeyPress="flgChange = true;">' % (
+                wikiutil.escape(kw.get('comment', ''), 1), ))
+        self.request.write("</p>")
+
         # Add textarea with page text
 
         # TODO: currently self.language is None at this point. We have
         # to do processing instructions parsing earlier, or move page
         # language into meta file.
@@ -366,17 +373,10 @@
             'dir': i18n.getDirection(lang),
             'rows': text_rows,
             'text': wikiutil.escape(raw_body)
         })
 
-        self.request.write("<p>")
-        self.request.write(_("Comment:"),
-            ' <input id="editor-comment" type="text" name="comment" value="%s" maxlength="200"'
-            ' onChange="flgChange = true;" onKeyPress="flgChange = true;">' % (
-                wikiutil.escape(kw.get('comment', ''), 1), ))
-        self.request.write("</p>")
-
         # Category selection
         filter = re.compile(self.cfg.page_category_regex, re.UNICODE).search
         cat_pages = self.request.rootpage.getPageList(filter=filter)
         cat_pages.sort()
         cat_pages = [wikiutil.pagelinkmarkup(p) for p in cat_pages]

Here is another patch that puts buttons on the top and the bottom (similar to the first one proposed):

--- PageEditorMoin.py   2007-03-25 22:50:12.000000000 +0100
+++ PageEditorUpDownButtons.py    2007-03-29 22:04:08.000000000 +0100
@@ -329,25 +329,28 @@
                 'cancel_button_text': cancel_button_text,
                      'license_link': wikiutil.getSysPage(self.request, self.cfg.page_license_page).link_to(self.request),
             }, '</em></p>')
 
 
-        self.request.write('''
+        button_bar = []
+        button_bar.append('''
 <input class="button" type="submit" name="button_save" value="%s" onClick="flgChange = false;">
 <input class="button" type="submit" name="button_preview" value="%s" onClick="flgChange = false;">
-''' % (save_button_text, _('Preview'),))
+''' % (save_button_text, _('Preview')))
         
         if not (self.request.cfg.editor_force and self.request.cfg.editor_default == 'text'):
-            self.request.write('''
+            button_bar.append('''
 <input id="switch2gui" style="display: none;" class="button" type="submit" name="button_switch" value="%s">
-''' % (_('GUI Mode'),))
+''' % (_('GUI Mode')))
             
-        self.request.write('''
+        button_bar.append('''
 %s
 <input class="button" type="submit" name="button_cancel" value="%s">
 <input type="hidden" name="editor" value="text">
-''' % (button_spellcheck, cancel_button_text,))
+''' % (button_spellcheck, cancel_button_text))
+
+        self.request.write(''.join(button_bar))
 
         # Add textarea with page text
 
         # TODO: currently self.language is None at this point. We have
         # to do processing instructions parsing earlier, or move page
@@ -402,10 +405,11 @@
 ''' % {
             'checked': ('', 'checked')[form.get('rstrip',['0'])[0] == '1'],
             'label': _('Remove trailing whitespace from each line')
             })
         self.request.write("</p>")
+        self.request.write(''.join(button_bar))
 
         badwords_re = None
         if preview is not None:
             if SpellCheck and (
                     form.has_key('button_spellcheck') or


CategoryFeatureRequest

MoinMoin: FeatureRequests/MoveButtonBarBelowCommentBox (last edited 2008-09-07 16:57:44 by MatthewEast)