wulliam / blogitizor

Automatically exported from code.google.com/p/blogitizor
0 stars 0 forks source link

Delete Dialog #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Make the "Are you sure you want to delete this record" message modular this
way you only have to call something such as

dialog("title", "content")

Original issue reported on code.google.com by Thadeus....@gmail.com on 17 Jan 2010 at 8:05

GoogleCodeExporter commented 9 years ago
Completed.

Located under utils.CONFIRM_BOX

Usage:

response.view = 'admin/confirmbox.html'
    def yes():
        do_purge()
        session.flash = "Data Purged"
        redirect(URL(r=request, f='imex'))
    def no():
        session.flash = "Purge Cancelled"
        redirect(URL(r=request, f='imex'))

    confirm = utils.CONFIRM_BOX(request, session,
                                title="Delete All Records",
                                label="Are you sure you want to delete ALL records?
This will also purge all USER accounts.",
                                content="ALL database records will be deleted",
                                func_yes=yes, func_no=no)

    return dict(confirm_box=confirm)

Original comment by Thadeus....@gmail.com on 17 Jan 2010 at 8:06