<?php
return array(
    "type" => "job_offer",
    "model" => "JobOffer",
    "label" => "job offers",
    "label_singular" => "job offer",
    "group" => "communicating",
    "template" => false,
    "order" => true,
    "show_id" => true,
    "baseUri" => array(
        1 => array(
            "en" => "/careers/vacancies",
            "de" => "/karriere/vacancies",
            "sv" => "/careers/vacancies",
            "fr" => "/carrieres/vacancies",
            "es" => "/careers/vacancies",
            "pt" => "/careers/vacancies"
        ),
        //1 => '/careers/vacancies',
        2 => '/careers'
    ),
    "fields" => array(
        array(
            "name" => "title",
            "label" => "title",
            "type" => "textBox",
            "maxLength" => 100,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "required|max:100",
            "inList" => true,
            "search" => true,
            "sort" => true
        ),
        array(
            "name" => "description",
            "label" => "details / Unit",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim",
            "validation" => ""
        ),
        array(
            "name" => "job_type",
            "label" => "Job Type",
            "type" => "selectBox",
            "list" => array(
                "contract" => "Contract",
                "freelance" => "Feelance",
                "project" => "Project"
            ),
            "preValidation" => "trim",
            "validation" => "required|in:contract,freelance,project",
            "placement" => "sidebar",
            "inList" => true,
            "search" => true,
            "sort" => true
        ),
        array(
            "name" => "business_unit",
            "label" => "Business Unit",
            "type" => "selectBox",
            "list" => array(
                "Central Functions" => "Central Functions",
                "Consultancy & Services" => "Consultancy & Services",
                "Key Account Management" => "Key Account Management",
                "Funds and Platforms" => "Funds and Platforms",
                "Marketing" => "Marketing",
                "Projects & Products" => "Projects & Products"
            ),
            "preValidation" => "trim",
            "validation" => "required",
            "placement" => "sidebar",
            "inList" => true,
            "search" => true,
            "sort" => true
        ),
        array(
            "name" => "summary",
            "label" => "Summary",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim",
            "validation" => ""
        ),

        array(
            "name" => "document",
            "label" => "PDF Document",
            "type" => "mediaPicker",
            "multiLanguage" => false,
            "mediaType" => "document",
            "placement" => "sidebar",
            "multiple" => false,
            "minSize" => "0"
        ),
        array(
            "name" => "detail_content",
            "label" => "Detail Page Content (SPG only)",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim",
            "validation" => ""
        ),
        array(
            "name" => "flexible_location",
            "label" => "Flexible Location",
            "type" => "selectBox",
            "list" => array(
                "0" => "No",
                "1" => "Yes"
            ),
            "preValidation" => "trim",
            "validation" => "required|in:0,1",
        ),
        array(
            "name" => "office_id",
            "label" => "office",
            "type" => "selectBox",
            "contentType" => "office",
            "preValidation" => "trim",
            "validation" => "nullable|integer|min:0",
            "inList" => true,
            "search" => false,
            "sort" => false,
            "parent" => array(
                "name" => "flexible_location",
                "values" => array("0")
            )
        ),
        array(
            "name" => "offices",
            "label" => "Offices",
            "type" => "multiplePicker",
            "objectTypes" => array("office"),
            "order" => true,
            "maxSize" => 10,
            "parent" => array(
                "name" => "flexible_location",
                "values" => array("1")
            )
        ),
    ),
    "actions" => array(
        "insert", "edit", "delete", "order"
    )
);
