<?php

/**
* TeamList for Contao
*
* Copyright (c) 2016 Benjamin Roth
*
* @license LGPL-3.0+
*/

$GLOBALS['TL_DCA']['tl_module']['palettes']['team_list'] = '
    {title_legend},name,headline,type;
    {team_legend},eSM_team_group,eSM_team_divisions;
    {image_legend},imgSize;
    {template_legend:hide},customTpl;
    {protected_legend:hide},protected;
    {expert_legend:hide},guests,cssID
';


$GLOBALS['TL_DCA']['tl_module']['fields']['eSM_team_group'] = array
(
  'label'                   => &$GLOBALS['TL_LANG']['tl_module']['eSM_team_group'],
  'exclude'                 => true,
  'inputType'               => 'select',
  'foreignKey'              => 'tl_esm_team_group.title',
  'eval'                    => array('mandatory'=>true,'includeBlankOption'=>true),
  'sql'                     => "int(10) unsigned NOT NULL default '0'"
);

$GLOBALS['TL_DCA']['tl_module']['fields']['eSM_team_divisions'] = array
(
	'label'                   => &$GLOBALS['TL_LANG']['tl_module']['eSM_team_divisions'],
	'exclude'                 => true,
	'inputType'               => 'checkboxWizard',
	'options'                 => $GLOBALS['eSM_team']['divisions'],
	'reference'               => &$GLOBALS['TL_LANG']['REF']['divisions'],
	'eval'                    => array('mandatory'=>true, 'multiple'=>true),
	'sql'                     => "blob NULL"
);