<?php

/**
 * Tweaks for Contao
 *
 * Copyright (c) 2016 Benjamin Roth [http://www.esales-media.de]
 *
 * @package eSM_tweaks
 * @link    http://www.esales-media.de
 * @license commercial
 */


$GLOBALS['TL_DCA']['tl_iso_rule']['fields']['type']['options'][] = 'affentaler';
$GLOBALS['TL_DCA']['tl_iso_rule']['fields']['type']['options'][] = 'special';
$GLOBALS['TL_DCA']['tl_iso_rule']['palettes']['affentaler'] = '{basic_legend},type,name,discount,rounding;{limit_legend:hide},limitPerMember,limitPerConfig,minItemQuantity,maxItemQuantity,quantityMode;{datim_legend:hide},startDate,endDate,startTime,endTime;{advanced_legend:hide},configRestrictions,memberRestrictions,productRestrictions;{enabled_legend},enabled';
$GLOBALS['TL_DCA']['tl_iso_rule']['palettes']['special'] = '{basic_legend},type,applyTo,name,label,discount,rounding;{coupon_legend:hide},enableCode;{limit_legend:hide},limitPerMember,limitPerConfig,minSubtotal,maxSubtotal,minWeight,maxWeight,minItemQuantity,maxItemQuantity,quantityMode;{datim_legend:hide},startDate,endDate,startTime,endTime;{advanced_legend:hide},configRestrictions,memberRestrictions,productRestrictions;{enabled_legend},enabled';


$GLOBALS['TL_DCA']['tl_iso_rule']['fields']['label']['sql'] = "varchar(1055) NOT NULL default ''";
$GLOBALS['TL_DCA']['tl_iso_rule']['fields']['label']['eval']['maxlength'] = 1055;