Skip to content

Commit

Permalink
Hide the "Save and duplicate" button if the DC is not copyable (see #796
Browse files Browse the repository at this point in the history
).
  • Loading branch information
qzminski authored and leofeyer committed Apr 27, 2017
1 parent 9befda4 commit 3322a00
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Resources/contao/drivers/DC_Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,11 @@ public function edit($intId=null, $ajaxId=null)
if (!$GLOBALS['TL_DCA'][$this->strTable]['config']['closed'] && !$GLOBALS['TL_DCA'][$this->strTable]['config']['notCreatable'])
{
$arrButtons['saveNcreate'] = '<button type="submit" name="saveNcreate" id="saveNcreate" class="tl_submit" accesskey="n">'.$GLOBALS['TL_LANG']['MSC']['saveNcreate'].'</button>';
$arrButtons['saveNduplicate'] = '<button type="submit" name="saveNduplicate" id="saveNduplicate" class="tl_submit" accesskey="d">'.$GLOBALS['TL_LANG']['MSC']['saveNduplicate'].'</button>';

if (!$GLOBALS['TL_DCA'][$this->strTable]['config']['notCopyable'])
{
$arrButtons['saveNduplicate'] = '<button type="submit" name="saveNduplicate" id="saveNduplicate" class="tl_submit" accesskey="d">'.$GLOBALS['TL_LANG']['MSC']['saveNduplicate'].'</button>';
}
}

if ($GLOBALS['TL_DCA'][$this->strTable]['config']['switchToEdit'])
Expand Down

0 comments on commit 3322a00

Please sign in to comment.