changeset 518:e779addaf39a

partial fix for the gui switch button problem (at least it is not then when forced text is active) imported from: moin--main--1.5--patch-522
author Thomas Waldmann <tw@waldmann-edv.de>
date Fri, 31 Mar 2006 19:12:59 +0000
parents 39da9e68875c
children 87d81b35c01c
files ChangeLog MoinMoin/PageEditor.py docs/CHANGES
diffstat 3 files changed, 27 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Mar 29 07:12:28 2006 +0000
+++ b/ChangeLog	Fri Mar 31 19:12:59 2006 +0000
@@ -2,6 +2,20 @@
 # arch-tag: automatic-ChangeLog--arch@arch.thinkmo.de--2003-archives/moin--main--1.5
 #
 
+2006-03-31 20:12:59 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-522
+
+    Summary:
+      partial fix for the gui switch button problem (at least it is not then when forced text is active)
+    Revision:
+      moin--main--1.5--patch-522
+
+    partial fix for the gui switch button problem (at least it is not then when forced text is active)
+    
+
+    modified files:
+     ChangeLog MoinMoin/PageEditor.py docs/CHANGES
+
+
 2006-03-29 08:12:28 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-521
 
     Summary:
--- a/MoinMoin/PageEditor.py	Wed Mar 29 07:12:28 2006 +0000
+++ b/MoinMoin/PageEditor.py	Fri Mar 31 19:12:59 2006 +0000
@@ -313,15 +313,22 @@
                      'license_link': wikiutil.getSysPage(self.request, self.cfg.page_license_page).link_to(self.request),
             }, '</em></p>')
 
+
         self.request.write('''
 <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;">
-<input id="switch2gui" style="display: none;" class="button" type="submit"     
-    name="button_switch" value="%s">
+''' % (save_button_text, _('Preview'),))
+        
+        if not (self.request.cfg.editor_force and self.request.cfg.editor_default == 'text'):
+            self.request.write('''
+<input id="switch2gui" style="display: none;" class="button" type="submit" name="button_switch" value="%s">
+''' % (_('GUI Mode'),))
+            
+        self.request.write('''
 %s
 <input class="button" type="submit" name="button_cancel" value="%s">
 <input type="hidden" name="editor" value="text">
-''' % (save_button_text, _('Preview'), _('GUI Mode'), button_spellcheck, cancel_button_text,))
+''' % (button_spellcheck, cancel_button_text,))
 
         # Add textarea with page text
 
--- a/docs/CHANGES	Wed Mar 29 07:12:28 2006 +0000
+++ b/docs/CHANGES	Fri Mar 31 19:12:59 2006 +0000
@@ -41,6 +41,9 @@
     * fixed double class attribute for nonexistent links
     * fixed double </a> with qm_noexist option
     * fixed table xxx="yyy" style attribute parsing
+    * if not (editor_force and editor_default == 'text') then display GUI mode
+      switch button (this is only a partial fix, but enough to deny the GUI
+      mode to your users completely)
   
   Other changes:
     * moved back UserPreferences action link from menu to top of page (renaming