<?php

$GLOBALS['TL_DCA']['tl_user_group']['palettes']['default'] = str_replace("{account_legend", "{ergebnisarchiv_legend:hide},td_erg_bereich,td_erg_email,td_erg_cc;{account_legend", $GLOBALS['TL_DCA']['tl_user_group']['palettes']['default']);
$GLOBALS['TL_DCA']['tl_user_group']['fields']['td_erg_bereich'] = array
(
    'sql' => "varchar(12) NULL",
    'label' => &$GLOBALS['TL_LANG']['tl_user_group']['td_erg_bereich'],
    'exclude' => false,
    'inputType' => 'select',
    'options_callback' => array('tl_user_group_td', 'getLigabereicheMitLabelInternal'),
    'eval' => array('mandatory' => false, 'includeBlankOption' => true, 'chosen' => true, 'tl_class' => 'w50'),
    'save_callback' => array(array('tl_user_group_td', 'saveCallbackErgbnisarchivLigabereich')),
);
$GLOBALS['TL_DCA']['tl_user_group']['fields']['td_erg_email'] = array
(
    'sql' => "varchar(128) NULL",
    'label' => &$GLOBALS['TL_LANG']['tl_user_group']['td_erg_email'],
    'exclude' => false,
    'inputType' => 'text',
    'eval' => array('mandatory' => false, 'rgxp' => 'email', 'tl_class' => 'w50'),
);
$GLOBALS['TL_DCA']['tl_user_group']['fields']['td_erg_cc'] = array
(
    'sql' => "varchar(128) NULL",
    'label' => &$GLOBALS['TL_LANG']['tl_user_group']['td_erg_cc'],
    'exclude' => false,
    'inputType' => 'text',
    'eval' => array('mandatory' => false, 'rgxp' => 'email', 'tl_class' => 'w50'),
);

class tl_user_group_td extends \Tanzsport\Ergebnisarchiv
{

    public function __construct()
    {
        parent::__construct();
    }

    public function saveCallbackErgbnisarchivLigabereich($value, DC_Table $dc)
    {
        if ($value == '') {
            return null;
        } else {
            return $value;
        }
    }

}
