<?php
return array(
    "type" => "short_redirect",
    "model" => "ShortRedirect",
    "label" => "Short Redirects",
    "label_singular" => "Redirects",
    "group" => "general",
    "template" => false,
    "order" => false,
    "shareable" => "none",
    "websites" => array(1),
    "fields" => array(
        array(
            "name" => "title",
            "label" => "title",
            "type" => "textBox",
            "maxLength" => 200,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "required|max:200",
            "inList" => true,
            "search" => true,
            "sort" => true
        ),
        array(
            "name" => "short_uri",
            "label" => "Short URI",
            "type" => "textBox",
            "maxLength" => 255,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "required|max:255|simple_uri",
            "inList" => true,
            "search" => true,
            "sort" => true,
            "info" => "URI Path with no query vars. Eg: '/some-thing/other-thing<br>For language variations, don't add the language prefix"
        ),
        array(
            "name" => "target_uri",
            "label" => "Target URI",
            "type" => "textBox",
            "maxLength" => 255,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "required|max:255|simple_uri_query",
            "inList" => true,
            "search" => true,
            "sort" => true,
            "info" => "Allows query vars. Eg: '/some-thing/other-thing?var=x<br>For language variations, don't add the language prefix"
        ),
        array(
            "name" => "type",
            "label" => "Redirect type",
            "type" => "selectBox",
            "list" => array(
                "301" => "Permanent (301)",
                "302" => "Temporary (302)"
            ),
            "preValidation" => "trim",
            "validation" => "required|in:301,302",
            "inList" => true,
            "search" => true,
            "sort" => true,
            "placement" => "sidebar"
        ),
        array(
            "name" => "no_langs",
            "label" => "Single redirect (no langs)",
            "type" => "checkBox",
            "placement" => "sidebar",
            "info" => "If selected, only the english redirect will be applied with no language prefix"
        )
    ),

    "actions" => array(
        "insert", "edit", "delete"
    )
);
