src/Rhyme/WMassArtsHub/Resources/contao/dca/tl_artshub_submission_callsforart.php line 314

Open in your IDE?
  1. <?php
  2. /**
  3.  * Copyright (c) 2020 Rhyme Digital LLC (https://rhyme.digital)
  4.  *
  5.  * @license LGPL-3.0-or-later
  6.  */
  7. namespace {
  8.     use Rhyme\WMassArtsHub\Backend\SubmissionCallsForArt\Callbacks;
  9.     use Contao\System;
  10.     System::loadLanguageFile('default');
  11.     /**
  12.      * Table tl_artshub_submission_callsforart
  13.      */
  14.     $GLOBALS['TL_DCA']['tl_artshub_submission_callsforart'] = array
  15.     (
  16.         // Config
  17.         'config' => array
  18.         (
  19.             'dataContainer'               => 'Table',
  20.             'enableVersioning'            => true,
  21.             'sql' => array
  22.             (
  23.                 'keys' => array
  24.                 (
  25.                     'id' => 'primary',
  26.                 )
  27.             )
  28.         ),
  29.         // List
  30.         'list' => array
  31.         (
  32.             'sorting' => array
  33.             (
  34.                 'mode'                    => 2,
  35.                 'fields'                  => ['title'],
  36.                 'panelLayout'             => 'sort,filter;search,limit'
  37.             ),
  38.             'label' => array
  39.             (
  40.                 'fields'                  => array('title'),
  41.                 'format'                  => '%s'
  42.             ),
  43.             'global_operations' => array
  44.             (
  45.                 'all' => array
  46.                 (
  47.                     'label'               => &$GLOBALS['TL_LANG']['MSC']['all'],
  48.                     'href'                => 'act=select',
  49.                     'class'               => 'header_edit_all',
  50.                     'attributes'          => 'onclick="Backend.getScrollOffset()" accesskey="e"'
  51.                 )
  52.             ),
  53.             'operations' => array
  54.             (
  55.                 'edit' => array
  56.                 (
  57.                     'label'               => &$GLOBALS['TL_LANG']['tl_artshub_submission_callsforart']['edit'],
  58.                     'href'                => 'act=edit',
  59.                     'icon'                => 'edit.gif'
  60.                 ),
  61.                 'copy' => array
  62.                 (
  63.                     'label'               => &$GLOBALS['TL_LANG']['tl_artshub_submission_callsforart']['copy'],
  64.                     'href'                => 'act=copy',
  65.                     'icon'                => 'copy.gif',
  66.                 ),
  67.                 'cut' => array
  68.                 (
  69.                     'label'               => &$GLOBALS['TL_LANG']['tl_page']['cut'],
  70.                     'href'                => 'act=paste&amp;mode=cut',
  71.                     'icon'                => 'cut.svg',
  72.                     'attributes'          => 'onclick="Backend.getScrollOffset()"',
  73.                 ),
  74.                 'delete' => array
  75.                 (
  76.                     'label'               => &$GLOBALS['TL_LANG']['tl_artshub_submission_callsforart']['delete'],
  77.                     'href'                => 'act=delete',
  78.                     'icon'                => 'delete.gif',
  79.                     'attributes'          => 'onclick="if(!confirm(\'' $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"',
  80.                 ),
  81.                 'toggle' => array
  82.                 (
  83.                     'label'               => &$GLOBALS['TL_LANG']['tl_artshub_submission_callsforart']['toggle'],
  84.                     'icon'                => 'visible.svg',
  85.                     'attributes'          => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
  86.                     'button_callback'     => array(Callbacks::class, 'toggleIcon')
  87.                 ),
  88.                 'show' => array
  89.                 (
  90.                     'label'               => &$GLOBALS['TL_LANG']['tl_artshub_submission_callsforart']['show'],
  91.                     'href'                => 'act=show',
  92.                     'icon'                => 'show.gif'
  93.                 )
  94.             )
  95.         ),
  96.         // Palettes
  97.         'palettes' => array
  98.         (
  99.             'default'                     => '{general_legend},title,alias,submissionDate,request_type,submitted_by,status;{details_legend},description,profiles,deadline;{contact_legend},contact_name,contact_phone,contact_email,contact_url;{location_legend},street,street_2,city,state,postal,latitude,longitude;{images_legend},images;{publishing_legend},published,start,stop;'
  100.         ),
  101.         // Subpalettes
  102.         'subpalettes' => array
  103.         (
  104.         ),
  105.         // Fields
  106.         'fields' => array
  107.         (
  108.             'id' => array
  109.             (
  110.                 'sql'                     => "int(10) unsigned NOT NULL auto_increment"
  111.             ),
  112.             'tstamp' => array
  113.             (
  114.                 'sql'                     => "int(10) unsigned NOT NULL default '0'"
  115.             ),
  116.             'lead_id' => array
  117.             (
  118.                 'sql'                     => "int(10) unsigned NOT NULL default '0'"
  119.             ),
  120.             'submissionDate' => array
  121.             (
  122.                 'exclude'                 => true,
  123.                 'sorting'                 => true,
  124.                 'inputType'               => 'text',
  125.                 'eval'                    => array('rgxp'=>'date''mandatory'=>true'doNotCopy'=>true'datepicker'=>true'tl_class'=>'w50 wizard'),
  126.                 'sql'                     => "int(10) unsigned NULL"
  127.             ),
  128.             'title' => array
  129.             (
  130.                 'exclude'                 => true,
  131.                 'search'                  => true,
  132.                 'inputType'               => 'text',
  133.                 'eval'                    => array('mandatory'=>true'maxlength'=>255'tl_class'=>'w50'),
  134.                 'sql'                     => "varchar(255) NOT NULL default ''"
  135.             ),
  136.             'alias' => array
  137.             (
  138.                 'exclude'                 => true,
  139.                 'inputType'               => 'text',
  140.                 'eval'                    => array('rgxp'=>'alias''doNotCopy'=>true'maxlength'=>128'tl_class'=>'w50'),
  141.                 'save_callback' => array
  142.                 (
  143.                     array(Callbacks::class, 'generateAlias')
  144.                 ),
  145.                 'sql'                     => "varchar(128) BINARY NOT NULL default ''"
  146.             ),
  147.             'request_type' => array
  148.             (
  149.                 'exclude' => true,
  150.                 'default' => '',
  151.                 'filter' => true,
  152.                 'inputType' => 'select',
  153.                 'options' => array('exhibitions''performance''commissions''residency_programs''other'),
  154.                 'reference' => $GLOBALS['TL_LANG']['tl_artshub_submission_callsforart'],
  155.                 'eval' => array('tl_class' => 'w50'),
  156.                 'sql' => "varchar(32) NOT NULL default ''"
  157.             ),
  158.             'submitted_by' => array
  159.             (
  160.                 'exclude' => true,
  161.                 'search' => true,
  162.                 'inputType' => 'text',
  163.                 'eval' => array('doNotCopy' => true'tl_class' => 'w50 clr'),
  164.                 'sql' => "varchar(255) NOT NULL default ''",
  165.             ),
  166.             'status' => array
  167.             (
  168.                 'exclude' => true,
  169.                 'default' => '',
  170.                 'filter' => true,
  171.                 'inputType' => 'select',
  172.                 'options' => array('''approved''rejected'),
  173.                 'reference' => $GLOBALS['TL_LANG']['MSC']['status_options'],
  174.                 'eval' => array('tl_class' => 'w50''readonly' => true'disabled' => true),
  175.                 'sql' => "varchar(32) NOT NULL default ''"
  176.             ),
  177.             'deadline' => array
  178.             (
  179.                 'exclude'                 => true,
  180.                 'inputType'               => 'text',
  181.                 'eval'                    => array('rgxp'=>'date''datepicker'=>true'tl_class'=>'w50 wizard'),
  182.                 'sql'                     => "int(10) unsigned NULL"
  183.             ),
  184.             'profiles' => array
  185.             (
  186.                 'exclude' => true,
  187.                 'search' => true,
  188.                 'filter' => true,
  189.                 'inputType' => 'artshubProfileItemSelector',
  190.                 'foreignKey' => 'tl_artshub_profile_item.name',
  191.                 'eval' => array('multiple' => true'chosen' => true'includeBlankOption' => true'tl_class' => 'w50'),
  192.                 'sql' => "blob NULL",
  193.                 'relation' => array('type' => 'hasMany''load' => 'lazy'),
  194.             ),
  195.             'contact_name' => array
  196.             (
  197.                 'exclude' => true,
  198.                 'search' => true,
  199.                 'inputType' => 'text',
  200.                 'eval' => array('maxlength' => 255'tl_class' => 'w50'),
  201.                 'sql' => "varchar(128) NOT NULL default ''"
  202.             ),
  203.             'contact_phone' => array
  204.             (
  205.                 'exclude' => true,
  206.                 'search' => true,
  207.                 'inputType' => 'text',
  208.                 'eval' => array('maxlength' => 255'tl_class' => 'w50'),
  209.                 'sql' => "varchar(32) NOT NULL default ''"
  210.             ),
  211.             'contact_email' => array
  212.             (
  213.                 'exclude' => true,
  214.                 'search' => true,
  215.                 'inputType' => 'text',
  216.                 'eval' => array('maxlength' => 255'tl_class' => 'w50'),
  217.                 'sql' => "varchar(255) NOT NULL default ''"
  218.             ),
  219.             'contact_url' => array
  220.             (
  221.                 'exclude' => true,
  222.                 'search' => true,
  223.                 'inputType' => 'text',
  224.                 'eval' => array('maxlength' => 255'tl_class' => 'w50'),
  225.                 'sql' => "varchar(255) NOT NULL default ''"
  226.             ),
  227.             'description' => array
  228.             (
  229.                 'exclude'                 => true,
  230.                 'search'                  => true,
  231.                 'inputType'               => 'textarea',
  232.                 'eval'                    => array('mandatory'=>true'rte'=>'tinyMCE''helpwizard'=>true),
  233.                 'attributes'              => array('fe_search'=>true),
  234.                 'explanation'             => 'insertTags',
  235.                 'sql'                     => "mediumtext NULL"
  236.             ),
  237.             'street' => array
  238.             (
  239.                 'exclude'                 => true,
  240.                 'search'                  => true,
  241.                 'inputType'               => 'text',
  242.                 'eval'                    => array('maxlength'=>255'tl_class'=>'w50'),
  243.                 'sql'                     => "varchar(255) NOT NULL default ''"
  244.             ),
  245.             'postal' => array
  246.             (
  247.                 'exclude'                 => true,
  248.                 'search'                  => true,
  249.                 'inputType'               => 'text',
  250.                 'eval'                    => array('maxlength'=>32,  'tl_class'=>'w50'),
  251.                 'sql'                     => "varchar(32) NOT NULL default ''"
  252.             ),
  253.             'city' => array
  254.             (
  255.                 'exclude'                 => true,
  256.                 'filter'                  => true,
  257.                 'search'                  => true,
  258.                 'sorting'                 => true,
  259.                 'inputType'               => 'text',
  260.                 'default'                 => '',
  261.                 'eval'                    => array('maxlength'=>255'tl_class'=>'w50'),
  262.                 'sql'                     => "varchar(255) NOT NULL default ''"
  263.             ),
  264.             'county' => array
  265.             (
  266.                 'exclude'                 => true,
  267.                 'filter'                  => true,
  268.                 'search'                  => true,
  269.                 'sorting'                 => true,
  270.                 'inputType'               => 'text',
  271.                 'default'                 => '',
  272.                 'eval'                    => array('maxlength'=>255'tl_class'=>'w50'),
  273.                 'sql'                     => "varchar(255) NOT NULL default ''"
  274.             ),
  275.             'state' => array
  276.             (
  277.                 'exclude'                 => true,
  278.                 'sorting'                 => true,
  279.                 'inputType'               => 'text',
  280.                 'default'                 => 'MA',
  281.                 'eval'                    => array('maxlength'=>2'tl_class'=>'w50'),
  282.                 'sql'                     => "varchar(2) NOT NULL default ''"
  283.             ),
  284.             'latitude' => array
  285.             (
  286.                 'exclude'                 => true,
  287.                 'search'                  => true,
  288.                 'inputType'               => 'text',
  289.                 'eval'                    => array('maxlength'=>255'tl_class'=>'w50' ),
  290.                 'sql'                     => "varchar(255) NOT NULL default ''"
  291.             ),
  292.             'longitude' => array
  293.             (
  294.                 'exclude'                 => true,
  295.                 'search'                  => true,
  296.                 'inputType'               => 'text',
  297.                 'eval'                    => array('maxlength'=>255'tl_class'=>'w50' ),
  298.                 'sql'                     => "varchar(255) NOT NULL default ''"
  299.             ),
  300.             'images' => array
  301.             (
  302.                 'exclude'                 => true,
  303.                 'inputType'               => 'fileTree',
  304.                 'eval'                    => array('multiple'=>true'fieldType'=>'checkbox''orderField'=>'orderImages''files'=>true'isGallery'=>true'extensions'=>\Contao\Config::get('validImageTypes'), 'tl_class'=>'clr''path'=>\Contao\Config::get('uploadPath').'/media'),
  305.                 'sql'                     => "blob NULL",
  306.             ),
  307.             'orderImages' => array
  308.             (
  309.                 'label'                   => &$GLOBALS['TL_LANG']['MSC']['sortOrder'],
  310.                 'sql'                     => "blob NULL"
  311.             ),
  312.             'published' => array
  313.             (
  314.                 'exclude'                 => true,
  315.                 'filter'                  => true,
  316.                 'inputType'               => 'checkbox',
  317.                 'eval'                    => array('tl_class'=>'w50 m12'),
  318.                 'sql'                     => "char(1) NOT NULL default ''"
  319.             ),
  320.             'start' => array
  321.             (
  322.                 'exclude'                 => true,
  323.                 'inputType'               => 'text',
  324.                 'eval'                    => array('rgxp'=>'datim''datepicker'=>true'tl_class'=>'clr w50 wizard'),
  325.                 'sql'                     => "varchar(10) NOT NULL default ''"
  326.             ),
  327.             'stop' => array
  328.             (
  329.                 'exclude'                 => true,
  330.                 'inputType'               => 'text',
  331.                 'eval'                    => array('rgxp'=>'datim''datepicker'=>true'tl_class'=>'w50 wizard'),
  332.                 'sql'                     => "varchar(10) NOT NULL default ''"
  333.             ),
  334.         )
  335.     );
  336. }