22a23 > import re 51,52c52 < bad_confirmation(doc) < doc.AddItem(MailmanLogo()) --- > show_informational_message(doc) 62,63c62 < bad_confirmation(doc, _('No such list %(safelistname)s')) < doc.AddItem(MailmanLogo()) --- > show_informational_message(doc, _('No such list %(safelistname)s')) 83,84c82 < bad_confirmation(doc) < doc.AddItem(mlist.GetMailmanFooter()) --- > show_informational_message(doc) 107,108c105 < bad_confirmation(doc, badconfirmstr) < doc.AddItem(mlist.GetMailmanFooter()) --- > show_informational_message(doc, badconfirmstr) 165c162 < bad_confirmation(doc, _('System error, bad content: %(content)s')) --- > show_informational_message(doc, _('System error, bad content: %(content)s')) 167c164 < bad_confirmation(doc, badconfirmstr) --- > show_informational_message(doc, badconfirmstr) 169d165 < doc.AddItem(mlist.GetMailmanFooter()) 171a168,198 > # > # Method for showing a simple message with (optionally) a more detailed description > # this uses a site-wide template because we have no ml-name > # (I replaced all bad_confirmation method calls with show_informational_message) > # @author Frank Schubert > # > > def show_informational_message(doc, extra=''): > doc.suppress_head = 1 > > message = _('Handling your request:') > # Do replacements > replacements = { } > #replacements[''] = Bold(FontSize('+2', message)).Format() > replacements[''] = message > replacements[''] = extra > text = Utils.maketext('confirm_show_informational_message.html') > parts = re.split('(]*>)', text) > i = 1 > while i < len(parts): > tag = parts[i].lower() > if replacements.has_key(tag): > repl = replacements[tag] > if isinstance(repl, type(u'')): > repl = repl.encode(charset, 'replace') > parts[i] = repl > else: > parts[i] = '' > i = i + 2 > output = EMPTYSTRING.join(parts) > doc.AddItem(output) 175,179c202 < title = _('Bad confirmation string') < doc.SetTitle(title) < doc.AddItem(Header(3, Bold(FontAttr(title, color='#ff0000', size='+2')))) < doc.AddItem(extra) < --- > show_informational_message(doc, extra) 321c344 < doc.AddItem(_('You have canceled your subscription request.')) --- > show_informational_message(doc, _('You have canceled your subscription request.')) 359,363c382,385 < title = _('Awaiting moderator approval') < doc.SetTitle(title) < doc.AddItem(Header(3, Bold(FontAttr(title, size='+2')))) < doc.AddItem(_("""\ < You have successfully confirmed your subscription request to the --- > show_informational_message(doc, _("""\ > Awaiting moderator approval > >

You have successfully confirmed your subscription request to the 367c389 < of the moderator's decision.""")) --- > of the moderator's decision.

""")) 369c391 < bad_confirmation(doc, _('''Invalid confirmation string. It is --- > show_informational_message(doc, _('''Invalid confirmation string. It is 373c395 < doc.addError(_("You are already a member of this mailing list!")) --- > show_informational_message(doc, _("You are already a member of this mailing list!")) 376c398 < doc.addError(_("""You are currently banned from subscribing to --- > show_informational_message(doc, _("""

You are currently banned from subscribing to 378c400 < contact the list owners at %(owneraddr)s.""")) --- > contact the list owners at %(owneraddr)s.

""")) 380,381c402,403 < doc.addError(_("""\ < You were not invited to this mailing list. The invitation has --- > show_informational_message(doc, _("""\ >

You were not invited to this mailing list. The invitation has 383c405 < alerted.""")) --- > alerted.

""")) 392,395c414,415 < doc.SetTitle(title) < doc.AddItem(Header(3, Bold(FontAttr(title, size='+2')))) < doc.AddItem(_('''\ < You have successfully confirmed your subscription request for --- > show_informational_message(doc, _('''\ >

You have successfully confirmed your subscription request for 398c418 < with your password, and other useful information and links. --- > with your password, and other useful information and links.

412c432 < doc.AddItem(_('You have canceled your unsubscription request.')) --- > show_informational_message(doc, _('You have canceled your unsubscription request.')) 434c454 < bad_confirmation(doc, _('''Invalid confirmation string. It is --- > show_informational_message(doc, _('''Invalid confirmation string. It is 440d459 < title = _('Unsubscription request confirmed') 442,445c461,463 < doc.SetTitle(title) < doc.AddItem(Header(3, Bold(FontAttr(title, size='+2')))) < doc.AddItem(_("""\ < You have successfully unsubscribed from the %(listname)s mailing --- > show_informational_message(doc, _("""\ > Unsubscription request confirmed >

You have successfully unsubscribed from the %(listname)s mailing 447c465 < information page.""")) --- > information page

.""")) 500c518 < doc.AddItem(_('You have canceled your change of address request.')) --- > show_informational_message(doc, _('You have canceled your change of address request.')) 523c541 < bad_confirmation(doc, _('''Invalid confirmation string. It is --- > show_informational_message(doc, _('''

Invalid confirmation string. It is 525c543 < address that has already been unsubscribed.''')) --- > address that has already been unsubscribed.

''')) 529c547 < doc.addError(_("""%(newaddr)s is banned from subscribing to the --- > show_informational_message(doc, _("""

%(newaddr)s is banned from subscribing to the 531c549 < please contact the list owners at %(owneraddr)s.""")) --- > please contact the list owners at %(owneraddr)s.

""")) 535d552 < title = _('Change of address request confirmed') 537,540c554,556 < doc.SetTitle(title) < doc.AddItem(Header(3, Bold(FontAttr(title, size='+2')))) < doc.AddItem(_("""\ < You have successfully changed your address on the %(listname)s --- > show_informational_message(doc, _("""\ > Change of address request confirmed >

You have successfully changed your address on the %(listname)s 543c559 < login page.""")) --- > login page.

""")) 603,608d618 < title = _('Continue awaiting approval') < doc.SetTitle(title) < table = Table(border=0, width='100%') < table.AddRow([Center(Bold(FontAttr(title, size='+1')))]) < table.AddCellInfo(table.GetCurrentRowIndex(), 0, < bgcolor=mm_cfg.WEB_HEADER_COLOR) 611,613c621,624 < table.AddRow([_('''Okay, the list moderator will still have the < opportunity to approve or reject this message.''')]) < doc.AddItem(table) --- > show_informational_message(doc, _('''\ > Continue awaiting approval >

Okay, the list moderator will still have the > opportunity to approve or reject this message.

''')) 639c650 < bad_confirmation(doc, _('''The held message with the Subject: --- > show_informational_message(doc, _('''

The held message with the Subject: 643c654 < time.''')) --- > time.

''')) 647,651c658,660 < title = _('Posted message canceled') < doc.SetTitle(title) < doc.AddItem(Header(3, Bold(FontAttr(title, size='+2')))) < doc.AddItem(_('''\ < You have successfully canceled the posting of your message with --- > show_informational_message(doc, _('''\ > Posted message canceled >

You have successfully canceled the posting of your message with 653c662 < %(listname)s.''')) --- > %(listname)s.

''')) 686c695 < bad_confirmation(doc, _("""The held message you were referred to has --- > show_informational_message(doc, _("""The held message you were referred to has 728c737 < doc.AddItem(_("""You have canceled the re-enabling of your membership. If --- > show_informational_message(doc, _("""

You have canceled the re-enabling of your membership. If 730c739 < this mailing list.""")) --- > this mailing list.

""")) 752c761 < bad_confirmation(doc, _('''Invalid confirmation string. It is --- > show_informational_message(doc, _('''Invalid confirmation string. It is 758d766 < title = _('Membership re-enabled.') 760,763c768,770 < doc.SetTitle(title) < doc.AddItem(Header(3, Bold(FontAttr(title, size='+2')))) < doc.AddItem(_("""\ < You have successfully re-enabled your membership in the --- > show_informational_message(doc, _("""\ > Membership re-enabled. >

You have successfully re-enabled your membership in the 765c772 < href="%(optionsurl)s">visit your member options page. --- > href="%(optionsurl)s">visit your member options page.