def email_prompt(self, result, title, urn):
header = urwid.Text(('text bold', 'Send detailed results report via email'))
subtitle = urwid.Text([
('text', 'The email report contains detailed results of each of the runned tests, '
'as well as links to guides on how to fix the found issues.\n\n'),
('text italic', 'You will be included into a MongoDB critical security bugs '
'newsletter. We will never SPAM you, we promise!')
])
content = urwid.Pile([header, DIV, subtitle])
card = FormCard(
{"content": content, "app": self.app},
['Email'],
'Send report',
{
'next': lambda form, email: self.send_email(email.strip(), result, title, urn) \
if validate_email(email) else form.set_message("Invalid email address", True),
'back': lambda _: self.display_overview(result, title, urn)
})
self.app.render(card)
评论列表
文章目录