/*
 * Author       : zszsolt
 * Generated on : 23-Nov-2009 07:27:53
 * Version      : 3.0
 */
application "SPOONPARTY"
{
    type = public
    date format = "dd-MMM-yyyy"
    time zone = "Europe/Zurich"
    section Home
    {
        form  SPOONPARTY_REGISTRATION
        {
            displayname  =  "SPOONPARTY REGISTRATION"
            captcha = true
            success message  =  "Data submitted. We will keep you informed."
            
            column
            {
                plain4
                (
                    type  =  plaintext
                    value = "<P>Please help us in organising the party by filling out the form and indicating which date suits you. Thank you !</P>\n"
                )

                plain3
                (
                    type  =  plaintext
                    value = "<DIV id=ted>\n<P><FONT size=4>Please help us organising the Spoonparty by registering if you are interested and choosing a prefered date. Thank you !</FONT></P></DIV>\n"
                )

                plain1
                (
                    type  =  plaintext
                    value = "<DIV id=ted>\n<DIV id=ted><FONT size=4>Dear guest, if you think you are seriously&nbsp;interested in the SPOONPARTY, please register yourself to indicate which date you prefer, to ease our planning efforts. Thank you !</FONT> </DIV></DIV>\n"
                )

                must  have  unique  Name
                (
                    displayname  =  "First Name Last Name"
                    type  =  text
                    tooltip  =  "Enter you Last Name and Fist Name."
                )

                must  have  unique  Your_Email_Address
                (
                    displayname  =  "Your Email Address"
                    type  =  email
                    tooltip  =  "Please enter your email address, so that we can notify you."
                )

                must  have  Gender
                (
                    type  =  picklist
                    values  =  {"F",   "M"}
                )

                plain
                (
                    type  =  plaintext
                    value = "<DIV id=ted>\n<P>In case of any questions/additional comments please email me: zszsolt@gmx.at.</P></DIV>\n"
                )

            }
            column
            {
                Your_Photo
                (
                    displayname  =  "Your Photo"
                    type = upload file
                )

                must  have  Which_dates_are_acceptable_for_you
                (
                    displayname  =  "Which dates are acceptable for you ?"
                    type  =  picklist
                    values  =  {"Aug. 23rd",   "Aug 30th",   "Sept 6th",   "All the above mentioned",   "Aug. 23rd and Aug 30th",   "Aug. 23rd and Sept 6th",   "Aug 30th and Sept 6th"}
                    tooltip  =  "Please read and choose carefully."
                )

                Your_comments
                (
                    displayname  =  "Your comments"
                    type  =  textarea
                )

                plain2
                (
                    type  =  plaintext
                    value = "<P>If you have any comments/questions please mail us on: zszsolt@gmx.at.</P>\n"
                )

            }
            actions
            {
                on add
                {
                    Submit
                    (
                        type  =  submit
                        displayname  =  "Submit"
                        on success
                        {
                            sendmail
                            (
                                To       :  "zszsolt@gmx.at" 
                                From     :  zoho.adminuserid 
                                Subject  :  "" 
                                Message  :  "<p>A user has filled out the SPOONPARTY WEBFORM.</p>" + input.formdata 
                            )
                        }
                    )
                    Reset
                    (
                        type  =  reset
                        displayname  =  "Reset"
                    )
                }
                on edit
                {
                    Update
                    (
                        type  =  submit
                        displayname  =  "Update"
                    )
                    Cancel
                    (
                        type  =  cancel
                        displayname  =  "Cancel"
                    )
                }
            }
        }

        list  ADMIN_VIEW
        {
            displayname = "ADMIN VIEW"
            show  all  rows  from  SPOONPARTY_REGISTRATION 
            (
                Name as "Last Name+First Name"
                Gender
                Your_Photo as "Your Photo"
                Your_Email_Address as "Your Email Address"
                Which_dates_are_acceptable_for_you as "Which dates are acceptable for you ?"
                Modified_Time as "Last Modified Time"
                Modified_User as "Last Modified User"
                Added_Time as "Added Time"
                Added_User as "Added User"
                Your_comments as "Your comments"
            )
            filters 
            (
                Gender
                Which_dates_are_acceptable_for_you
            )
            options
            (
                display rows = 50
            )
        }

        list  List_of_Participants_so_far
        {
            displayname = "List of Participants so far..."
            show  all  rows  from  SPOONPARTY_REGISTRATION 
            (
                Name as "Last Name+First Name"
                Gender
                Your_Photo as "Your Photo"
                Your_Email_Address as "Your Email Address"
                Which_dates_are_acceptable_for_you as "Which dates are acceptable for you ?"
                Modified_Time as "Last Modified Time"
            )
            filters 
            (
                Gender
                Which_dates_are_acceptable_for_you
            )
            options
            (
                display rows = 100
            )
        }

    }

}
