Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Hide the "start" and "stop" fields if an element is not published (see
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Sep 22, 2014
1 parent 364b456 commit 5add00f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Resources/contao/dca/tl_calendar_events.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -146,7 +146,8 @@
'addEnclosure' => 'enclosure',
'source_internal' => 'jumpTo',
'source_article' => 'articleId',
'source_external' => 'url,target'
'source_external' => 'url,target',
'published' => 'start,stop'
),

// Fields
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5add00f

Please sign in to comment.