<?php /** * References for Contao * * Copyright (c) 2014 Benjamin Roth [http://www.esales-media.de] * * @package eSM_clients * @link http://www.esales-media.de * @license commercial */ /** * Table tl_module */ /** * Add palettes to tl_module */ $GLOBALS['TL_DCA']['tl_module']['palettes']['clientsShowcase'] = '{title_legend},name,headline,type;{config_legend},esm_numberOfItems,perPage;{reference_legend},jumpTo;{template_legend:hide},customTpl,esm_clientsShowcase_template;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space'; $GLOBALS['TL_DCA']['tl_module']['palettes']['clientsProject'] = '{title_legend},name,headline,type;{image_legend},imgSize,fullsize;{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space'; $GLOBALS['TL_DCA']['tl_module']['palettes']['clientsProjectDevices'] = '{title_legend},name,headline,type;{devices_legend},esm_clients_devices;{settings_legend},esm_clients_devices_dimensions;{template_legend:hide},customTpl,esm_clients_devices_template;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space'; /** * Add fields to tl_module */ $GLOBALS['TL_DCA']['tl_module']['fields']['esm_numberOfItems'] = array ( 'label' => &$GLOBALS['TL_LANG']['tl_module']['esm_numberOfItems'], 'default' => 0, 'exclude' => true, 'inputType' => 'text', 'eval' => array('mandatory'=>true, 'rgxp'=>'natural', 'tl_class'=>'w50'), 'sql' => "smallint(5) unsigned NOT NULL default '0'" ); $GLOBALS['TL_DCA']['tl_module']['fields']['esm_clientsShowcase_template'] = array ( 'label' => &$GLOBALS['TL_LANG']['tl_module']['esm_clientsShowcase_template'], 'default' => '_clientsShowcase_default', 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('tl_module_esm_clients', 'getClientsShowcaseTemplates'), 'eval' => array('tl_class'=>'w50'), 'sql' => "varchar(32) NOT NULL default ''" ); $GLOBALS['TL_DCA']['tl_module']['fields']['esm_clients_devices_template'] = array ( 'label' => &$GLOBALS['TL_LANG']['tl_module']['esm_clients_devices_template'], 'default' => '_project_devices_default', 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('tl_module_esm_clients', 'getProjectDevicesTemplates'), 'eval' => array('tl_class'=>'w50'), 'sql' => "varchar(32) NOT NULL default ''" ); $GLOBALS['TL_DCA']['tl_module']['fields']['esm_clients_devices'] = array ( 'label' => &$GLOBALS['TL_LANG']['tl_module']['esm_clients_devices'], 'exclude' => true, 'inputType' => 'checkbox', 'options' => array('desktop','smartphone','tablet'), 'reference' => &$GLOBALS['TL_LANG']['ESM_CLIENTS']['REF']['devices'], 'eval' => array('mandatory'=>true, 'multiple'=>true), 'sql' => "varchar(128) NOT NULL default ''" ); $GLOBALS['TL_DCA']['tl_module']['fields']['esm_clients_devices_dimensions'] = array ( 'label' => &$GLOBALS['TL_LANG']['tl_module']['esm_clients_devices_dimensions'], 'exclude' => true, 'inputType' => 'imageSize', 'options' => array('proportional'), 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'eval' => array('rgxp'=>'natural', 'includeBlankOption'=>true, 'nospace'=>true, 'tl_class'=>'w50'), 'sql' => "varchar(64) NOT NULL default ''" );