/*
 * Author       : template
 * Generated on : 23-Nov-2009 00:49:02
 * Version      : 3.0
 */
application "To Do"
{
    type = public
    allow html = true
    date format = "dd-MMM-yyyy"
    time zone = "America/Los_Angeles"
    section To_Do
    {
        displayname = "To Do"
        form  My_To_Dos
        {
            
            must  have  What_to_do
            (
                displayname  =  "What to do"
                type  =  text
                maxchar  =  50
            )

            Type1
            (
                displayname  =  "Type"
                type  =  radiobuttons
                values  =  {"Task",   "Action"}
            )

            Priority
            (
                type  =  radiobuttons
                values  =  {"High",   "Medium",   "Low"}
            )

            Creation_Date
            (
                displayname  =  "Creation Date"
                type  =  date
            )

            Deadline_Date
            (
                displayname  =  "Deadline Date"
                type  =  date
            )

            Comments
            (
                type  =  textarea
                width  =  4 , 27
            )

            actions
            {
                on add
                {
                    Submit
                    (
                        type  =  submit
                        displayname  =  "Submit"
                    )
                    Reset
                    (
                        type  =  reset
                        displayname  =  "Reset"
                    )
                }
                on edit
                {
                    Update
                    (
                        type  =  submit
                        displayname  =  "Update"
                    )
                    Cancel
                    (
                        type  =  cancel
                        displayname  =  "Cancel"
                    )
                }
            }
        }

    }

    section High_Priority_List
    {
        list  High_Priority1
        {
            displayname = "High_Priority"
            show  all  rows  from  My_To_Dos [Priority == "High"]
            (
                What_to_do as "What to do"
                Type1 as "Type"
                Deadline_Date as "Deadline Date"
                Comments
            )
            options
            (
                display rows = 100
            )
            permission
            (
                add = true
                edit = true
                delete = true
            )
        }

    }

    section Medium_Priority_List
    {
        displayname = "Medium Priority List"
        list  Medium_Priority1
        {
            displayname = "Medium_Priority"
            show  all  rows  from  My_To_Dos [Priority == "Medium"]
            (
                What_to_do as "What to do"
                Type1 as "Type"
                Deadline_Date as "Deadline Date"
                Comments
            )
            options
            (
                display rows = 100
            )
            permission
            (
                add = true
                edit = true
                delete = true
            )
        }

    }

    section Low_Priority_List
    {
        displayname = "Low Priority List"
        list  Low_Priority
        {
            displayname = "Low Priority"
            show  all  rows  from  My_To_Dos [Priority == "Low"]
            (
                What_to_do as "What to do"
                Type1 as "Type"
                Deadline_Date as "Deadline Date"
                Comments
            )
            options
            (
                display rows = 100
            )
            permission
            (
                add = true
                edit = true
                delete = true
            )
        }

    }

    section All
    {
        list  All1
        {
            displayname = "All"
            show  all  rows  from  My_To_Dos 
            (
                What_to_do as "What to do"
                Type1 as "Type"
                Priority
                Creation_Date as "Creation Date"
                Deadline_Date as "Deadline Date"
                Comments
            )
            options
            (
                display rows = 100
            )
            permission
            (
                add = true
                edit = true
                delete = true
            )
        }

    }

}
