/*
 * Author       : quintadoindico
 * Generated on : 22-Nov-2009 22:49:34
 * Version      : 3.0
 */
application "Mozambique Consultants Database"
{
    type = public
    date format = "dd-MMM-yyyy"
    time zone = "Africa/Mbabane"
    section Home
    {
        form  MozConsultDB
        {
            displayname  =  "Mozambique Consulting DB"
            captcha = true
            success message  =  "Thanks for submitting your data!"
            
            column
            {
                must  have  Full_Name
                (
                    displayname  =  "Full Name"
                    type  =  text
                )

                Company_Name_if_applicable
                (
                    displayname  =  "Company Name (if applicable)"
                    type  =  text
                )

                Areas_of_Expertise
                (
                    displayname  =  "Areas of Expertise"
                    type  =  list
                    values  =  {"Water and Sanitation",   "ICT",   "Education",   "Decentralization",   "Governance",   "Tourism",   "Agriculture",   "Local Economic Development",   "Advocacy",   "Training",   "Organizational Development",   "Natural Resources Management",   "Marketing/Strategic Planning",   "Gender",   "HIV/AIDS",   "Food Security",   "Disaster Management/Relief",   "Value Chain Development",   "Business Services Development",   "Health Care",   "Basic Services",   "MDG",   "Fishing/Livestock",   "Infrastructure/Architecture",   "Human Resources",   "Project Management",   "Process Facilitation",   "Financial Management",   "Accounting/Bookkeeping",   "Design",   "Statistics/GIS",   "Business Management"}
                )

                Level
                (
                    type  =  picklist
                    values  =  {"PHD/Dr.",   "Masters",   "Licenciatura",   "Bachelor",   "None"}
                )

                Experience
                (
                    type  =  list
                    values  =  {"0-3 years",   "4-5 years",   "5-9 years",   "10+ years"}
                )

                Can_work_in
                (
                    displayname  =  "Can work in"
                    type  =  list
                    values  =  {"South Mozambique",   "Central Mozambique",   "North Mozambique"}
                )

                Rate
                (
                    type  =  list
                    values  =  {"100-200 USD/Day",   "201-300 USD/Day",   "301-400 USD/Day",   "401-500 USD/Day",   "500+ USD/Day",   "Negotiable"}
                )

                must  have  Languages_fluent
                (
                    displayname  =  "Languages (fluent)"
                    type  =  list
                    values  =  {"Portuguese",   "English",   "Local Mozambican Languages (min 2)",   "Spanish",   "French",   "Italian",   "Other"}
                )

            }
            column
            {
                must  have  Email
                (
                    type  =  email
                )

                must  have  Cell
                (
                    displayname  =  "Cell (e.g. +258 82 ...)"
                    type  =  text
                )

                Skype_id
                (
                    displayname  =  "Skype id"
                    type  =  text
                )

                Website
                (
                    type  =  url
                    enable   linkname
                )

                UploadCV
                (
                    displayname  =  "Upload CV (350Kb max)"
                    type = upload file
                )

                Available
                (
                    type  =  list
                    values  =  {"Direct",   "1 week notice",   "2 week notice",   "2+ week notice"}
                )

                Observations
                (
                    type  =  textarea
                )

                Type_of_consultant
                (
                    displayname  =  "Type of consultant"
                    type  =  list
                    values  =  {"Small company (1-5 people)",   "Individual/Freelance",   "Medium company (6-20 people)",   "Large company (20+ people)"}
                )

                must  have  Nationality
                (
                    type  =  list
                    values  =  {"Mozambican",   "South African",   "Zimbabwean",   "Other African Countries",   "European",   "North American",   "South American",   "Other"}
                )

            }
            actions
            {
                on add
                {
                    Submit
                    (
                        type  =  submit
                        displayname  =  "Submit"
                        on success
                        {
                            sendmail
                            (
                                To       :  "david@korver.com" 
                                From     :  zoho.adminuserid 
                                Subject  :  "Form added to MozConsultDB" 
                                Message  :  input.formdata 
                            )
                        }
                    )
                    Reset
                    (
                        type  =  reset
                        displayname  =  "Reset"
                    )
                }
                on edit
                {
                    Update
                    (
                        type  =  submit
                        displayname  =  "Update"
                    )
                    Cancel
                    (
                        type  =  cancel
                        displayname  =  "Cancel"
                    )
                }
            }
        }

        list  MozConsultDB_View
        {
            displayname = "MozConsultDB View"
            show  all  rows  from  MozConsultDB 
            (
                Full_Name as "Full Name"
                Email
                UploadCV as "CV"
                Areas_of_Expertise as "Areas of Expertise"
                Experience
                Can_work_in as "Can work in"
                Rate
                Available
                Observations
                Nationality
                Languages_fluent as "Languages (fluent)"
                Type_of_consultant as "Type of consultant"
                Website
                Level
                Company_Name_if_applicable as "Company Name (if applicable)"
                Cell
                Skype_id as "Skype id"
            )
            filters 
            (
                Added_Time
                Modified_Time
                Areas_of_Expertise
                Experience
                Rate
                Languages_fluent
                Type_of_consultant
                Nationality
            )
            options
            (
                display rows = 100
            )
            permission
            (
                add = true
                edit = true
                delete = true
            )
        }

        list  MozConsultDBSpreadsheet1
        {
            displayname = "MozConsultDBSpreadsheet"
            show  all  rows  from  MozConsultDB 
            (
                Full_Name as "Full Name"
                Email
                UploadCV as "Upload CV (250Kb max)"
                Areas_of_Expertise as "Areas of Expertise"
                Experience
                Can_work_in as "Can work in"
                Rate
                Available
                Observations
                Nationality
                Languages_fluent as "Languages (fluent)"
                Type_of_consultant as "Type of consultant"
                Website
                Level
            )
            filters 
            (
                Added_Time
                Modified_Time
                Areas_of_Expertise
                Level
                Experience
                Can_work_in
                Rate
                Languages_fluent
                Available
                Type_of_consultant
                Nationality
            )
            options
            (
                display rows = 100
            )
        }

    }

}
