/*
 * Author       : template
 * Generated on : 23-Nov-2009 06:25:12
 * Version      : 3.0
 */
application "Donation"
{
    type = public
    allow html = true
    date format = "dd-MMM-yyyy"
    time zone = "America/Los_Angeles"
    section Donation_Form
    {
        displayname = "Donation Form"
        form  donation_form
        {
            displayname  =  "Donation form"
            
            Doantion_for
            (
                displayname  =  "Donate for"
                type  =  picklist
                values  =  {"Kashmir Earthquake",   "Tsunami",   "Hurricane Rita",   "Hurricane Katrina",   "National Disaster Relief Fund",   "Your Local Red Cross Chapter",   "International Response Fund",   "Military Services",   "Biomedical Services Campaign",   "Measles Initiative"}
                sortorder  =  ascending
            )

            autogen_Or_Enter_your_Choice
            (
                displayname  =  " Or enter your choice"
                type  =  text
                width  =  30
                maxchar  =  30
            )

            autogen_I_m_willing_to_donate
            (
                displayname  =  "Willing to donate"
                type  =  USD
                decimalplace  =  0
            )

            Your_Name
            (
                displayname  =  "Your Name"
                type  =  text
                width  =  30
                maxchar  =  30
            )

            Company_Organisation_Name
            (
                displayname  =  "Organisation Name"
                type  =  text
                width  =  30
                maxchar  =  30
            )

            Address
            (
                type  =  textarea
                width  =  4 , 27
            )

            Telephone_Number
            (
                displayname  =  "Telephone Number"
                type  =  text
                width  =  30
                maxchar  =  30
            )

            Email_Id
            (
                displayname  =  "Email Id"
                type  =  email
                width  =  30
                maxchar  =  30
            )

            Contact_me_by_Email
            (
                displayname  =  "Can we get it touch with you by Email?"
                type  =  checkbox
                defaultvalue  =  false
            )

            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 Donations_made
    {
        displayname = "Donations made"
        list  Donor_Details
        {
            displayname = "Donor Details"
            show  all  rows  from  donation_form 
            (
                Email_Id as "Email Id"
                Doantion_for as "Donation for"
                Your_Name as "Your Name"
                Address
                Telephone_Number as "Telephone Number"
            )
            filters 
            (
                Doantion_for
            )
            options
            (
                display rows = 100
            )
            permission
            (
                add = true
                edit = true
                delete = true
            )
        }

    }

}
