<?php

/**
 * Contao Open Source CMS
 *
 * Copyright (C) 2005-2013 Leo Feyer
 *
 * @package   eS_easysale
 * @author    Patrick Froch <patrick.froch@easySolutionsIT.de>
 * @link      http://easySolutionsIT.de
 * @license   LGPL
 * @copyright e@sy Solutions IT 2013
 */


/**
 * Table tl_content
 */

// palettes
$GLOBALS['TL_DCA']['tl_settings']['palettes']['default'] .= ';{rp_password_legend}, rp_prefix, rp_postfix, rp_includespecialchars, rp_excludechars, rp_charcount, rp_peoplefilter, rp_charclasses; {rp_mail_legend}, rp_mailsubject, rp_mailtext;';

// fields
$GLOBALS['TL_DCA']['tl_settings']['fields']['rp_prefix'] = array
(
    'label'                   => &$GLOBALS['TL_LANG']['tl_settings']['rp_prefix'],
    'inputType'               => 'text',
    'load_callback'           => array(array('resetPass', 'loadSettingValue')),
    'eval'                    => array('tl_class'=>'w50', 'alwaysSave' => true)
);

$GLOBALS['TL_DCA']['tl_settings']['fields']['rp_postfix'] = array
(
    'label'                   => &$GLOBALS['TL_LANG']['tl_settings']['rp_postfix'],
    'inputType'               => 'text',
    'load_callback'           => array(array('resetPass', 'loadSettingValue')),
    'eval'                    => array('tl_class'=>'w50', 'alwaysSave' => true)
);

$GLOBALS['TL_DCA']['tl_settings']['fields']['rp_charclasses'] = array
(
    'label'                   => &$GLOBALS['TL_LANG']['tl_settings']['rp_charclasses'],
    'inputType'               => 'checkbox',
    'options'                 => array('upper', 'lower', 'digit', 'special'),
    'reference'               => $GLOBALS['TL_LANG']['MSC']['eS_ResetPassword']['rp_charclasses']['reference'],
    'load_callback'           => array(array('resetPass', 'loadSettingValue')),
    'eval'                    => array('multiple' => true, 'tl_class' => 'long clr', 'alwaysSave' => true)
);

$GLOBALS['TL_DCA']['tl_settings']['fields']['rp_includespecialchars'] = array
(
    'label'                   => &$GLOBALS['TL_LANG']['tl_settings']['rp_includespecialchars'],
    'inputType'               => 'text',
    'load_callback'           => array(array('resetPass', 'loadSettingValue')),
    'eval'                    => array('tl_class'=>'w50', 'alwaysSave' => true, 'decodeEntities' => false, 'nospace' => true)
);

$GLOBALS['TL_DCA']['tl_settings']['fields']['rp_excludechars'] = array
(
    'label'                   => &$GLOBALS['TL_LANG']['tl_settings']['rp_excludechars'],
    'inputType'               => 'text',
    'load_callback'           => array(array('resetPass', 'loadSettingValue')),
    'eval'                    => array('tl_class'=>'w50', 'alwaysSave' => true)
);

$GLOBALS['TL_DCA']['tl_settings']['fields']['rp_charcount'] = array
(
    'label'                   => &$GLOBALS['TL_LANG']['tl_settings']['rp_charcount'],
    'inputType'               => 'text',
    'load_callback'           => array(array('resetPass', 'loadSettingValue')),
    'eval'                    => array('maxlength'=>2, 'tl_class'=>'w50', 'alwaysSave' => true, '')
);

$GLOBALS['TL_DCA']['tl_settings']['fields']['rp_peoplefilter'] = array
(
    'label'                   => &$GLOBALS['TL_LANG']['tl_settings']['rp_peoplefilter'],
    'inputType'               => 'select',
    'options'                 => array('active', 'all'),
    'reference'               => $GLOBALS['TL_LANG']['MSC']['eS_ResetPassword']['rp_peoplefilter']['reference'],
    'load_callback'           => array(array('resetPass', 'loadSettingValue')),
    'eval'                    => array('tl_class'=>'w50', 'alwaysSave' => true)
);

$GLOBALS['TL_DCA']['tl_settings']['fields']['rp_mailsubject'] = array
(
    'label'                   => &$GLOBALS['TL_LANG']['tl_settings']['rp_mailsubject'],
    'inputType'               => 'text',
    'load_callback'           => array(array('resetPass', 'loadSettingValue')),
    'eval'                    => array('tl_class'=>'long', 'alwaysSave' => true)
);

$GLOBALS['TL_DCA']['tl_settings']['fields']['rp_mailtext'] = array
(
    'label'                   => &$GLOBALS['TL_LANG']['tl_settings']['rp_mailtext'],
    'inputType'               => 'textarea',
    'load_callback'           => array(array('resetPass', 'loadSettingValue')),
    'eval'                    => array('tl_class'=>'lond clr', 'rte' => 'tinyMCE', 'alwaysSave' => true)
);