comparison MoinMoin/PageGraphicalEditor.py @ 3035:b545446562a0

fix for MoinMoinBugs/TrivialChangeEasyAccess (thanks to Ninnu) (ported from 1.6)
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 03 Feb 2008 20:57:26 +0100
parents 7b0aadb97d01
children c0d62e7f4fbc
comparison
equal deleted inserted replaced
3034:d0d9fbc0f0ee 3035:b545446562a0
285 request.write(''' 285 request.write('''
286 %s 286 %s
287 <input class="button" type="submit" name="button_cancel" value="%s"> 287 <input class="button" type="submit" name="button_cancel" value="%s">
288 <input type="hidden" name="editor" value="gui"> 288 <input type="hidden" name="editor" value="gui">
289 ''' % (button_spellcheck, cancel_button_text, )) 289 ''' % (button_spellcheck, cancel_button_text, ))
290 if self.cfg.mail_enabled:
291 request.write('''
292 <script type="text/javascript">
293 function toggle_trivial(CheckedBox)
294 {
295 TrivialBoxes = document.getElementsByName("trivial");
296 for (var i = 0; i < TrivialBoxes.length; i++)
297 TrivialBoxes[i].checked = CheckedBox.checked;
298 }
299 </script>
300 &nbsp;
301 <input type="checkbox" name="trivial" id="chktrivial" value="1" %(checked)s onclick="toggle_trivial(this)">
302 <label for="chktrivial">%(label)s</label>
303 ''' % {
304 'checked': ('', 'checked')[form.get('trivial', ['0'])[0] == '1'],
305 'label': _("Trivial change", formatted=False),
306 })
290 307
291 from MoinMoin.security.textcha import TextCha 308 from MoinMoin.security.textcha import TextCha
292 request.write(TextCha(request).render()) 309 request.write(TextCha(request).render())
293 310
294 self.sendconfirmleaving() # TODO update state of flgChange to make this work, see PageEditor 311 self.sendconfirmleaving() # TODO update state of flgChange to make this work, see PageEditor
359 'category': unicode(web.makeSelection('category', cat_pages)), 376 'category': unicode(web.makeSelection('category', cat_pages)),
360 }) 377 })
361 if self.cfg.mail_enabled: 378 if self.cfg.mail_enabled:
362 request.write(''' 379 request.write('''
363 &nbsp; 380 &nbsp;
364 <input type="checkbox" name="trivial" id="chktrivial" value="1" %(checked)s> 381 <input type="checkbox" name="trivial" id="chktrivial" value="1" %(checked)s onclick="toggle_trivial(this)">
365 <label for="chktrivial">%(label)s</label> ''' % { 382 <label for="chktrivial">%(label)s</label> ''' % {
366 'checked': ('', 'checked')[form.get('trivial', ['0'])[0] == '1'], 383 'checked': ('', 'checked')[form.get('trivial', ['0'])[0] == '1'],
367 'label': _("Trivial change"), 384 'label': _("Trivial change"),
368 }) 385 })
369 386