Skip to content

Commit

Permalink
Added option to select files in URL fields
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Nov 9, 2015
1 parent e8b96a4 commit 824f502
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/MadeYourDay/Contao/CustomElements.php
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,12 @@ protected function createDcaItem($fieldPrefix, $fieldName, $fieldConfig, &$palet
$fieldConfig['eval']['tl_class'] =
(isset($fieldConfig['eval']['tl_class']) ? $fieldConfig['eval']['tl_class'] . ' ' : '')
. 'wizard';
if (!isset($fieldConfig['eval']['fieldType'])) {
$fieldConfig['eval']['fieldType'] = 'radio';
}
if (!isset($fieldConfig['eval']['filesOnly'])) {
$fieldConfig['eval']['filesOnly'] = true;
}
}

$GLOBALS['TL_DCA'][$dc->table]['fields'][$fieldPrefix . $fieldName] = $fieldConfig;
Expand Down Expand Up @@ -666,6 +672,7 @@ public function pagePicker($dc)
. '&table=' . $dc->table
. '&field=' . $dc->field
. '&value=' . str_replace(array('{{link_url::', '}}'), '', $dc->value)
. (version_compare(VERSION, '3.5', '>=') ? '&switch=1&id=' . $dc->id : '')
. '"'
. ' title="' . specialchars($GLOBALS['TL_LANG']['MSC']['pagepicker']) . '"'
. ' onclick="'
Expand Down

0 comments on commit 824f502

Please sign in to comment.