From 7c6d6f7579a97d9b9093b7d8126f76cea52c9b01 Mon Sep 17 00:00:00 2001 From: Leo Feyer Date: Mon, 22 Sep 2014 13:20:33 +0200 Subject: [PATCH] Hide the "start" and "stop" fields if an element is not published (see #7148) --- src/Resources/contao/dca/tl_calendar_events.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Resources/contao/dca/tl_calendar_events.php b/src/Resources/contao/dca/tl_calendar_events.php index 00f6e3b4ab..0092a944d1 100644 --- a/src/Resources/contao/dca/tl_calendar_events.php +++ b/src/Resources/contao/dca/tl_calendar_events.php @@ -133,8 +133,8 @@ // Palettes 'palettes' => array ( - '__selector__' => array('addTime', 'addImage', 'recurring', 'addEnclosure', 'source'), - 'default' => '{title_legend},title,alias,author;{date_legend},addTime,startDate,endDate;{details_legend},location,teaser;{image_legend},addImage;{recurring_legend},recurring;{enclosure_legend:hide},addEnclosure;{source_legend:hide},source;{expert_legend:hide},cssClass,noComments;{publish_legend},published,start,stop' + '__selector__' => array('addTime', 'addImage', 'recurring', 'addEnclosure', 'source', 'published'), + 'default' => '{title_legend},title,alias,author;{date_legend},addTime,startDate,endDate;{details_legend},location,teaser;{image_legend},addImage;{recurring_legend},recurring;{enclosure_legend:hide},addEnclosure;{source_legend:hide},source;{expert_legend:hide},cssClass,noComments;{publish_legend},published' ), // Subpalettes @@ -146,7 +146,8 @@ 'addEnclosure' => 'enclosure', 'source_internal' => 'jumpTo', 'source_article' => 'articleId', - 'source_external' => 'url,target' + 'source_external' => 'url,target', + 'published' => 'start,stop' ), // Fields @@ -483,7 +484,7 @@ 'filter' => true, 'flag' => 2, 'inputType' => 'checkbox', - 'eval' => array('doNotCopy'=>true), + 'eval' => array('submitOnChange'=>true, 'doNotCopy'=>true), 'sql' => "char(1) NOT NULL default ''" ), 'start' => array