... | ... |
@@ -26,7 +26,8 @@ $GLOBALS['TL_DCA']['tl_user_group']['fields']['sec_dl_access'] = array |
26 | 26 |
'label' => &$GLOBALS['TL_LANG']['tl_user_group']['sec_dl_access'], |
27 | 27 |
'exclude' => true, |
28 | 28 |
'filter' => true, |
29 |
- 'options' => array('edit'), |
|
29 |
+ 'options' => array('edit'=>'edit'), |
|
30 |
+ 'eval' => array('multiple'=>true), |
|
30 | 31 |
'reference' => &$GLOBALS['TL_LANG']['MSC'], |
31 | 32 |
'inputType' => 'checkbox', |
32 | 33 |
'sql' => "blob NULL" |
... | ... |
@@ -26,7 +26,9 @@ $GLOBALS['TL_DCA']['tl_user_group']['fields']['sec_dl_access'] = array |
26 | 26 |
'label' => &$GLOBALS['TL_LANG']['tl_user_group']['sec_dl_access'], |
27 | 27 |
'exclude' => true, |
28 | 28 |
'filter' => true, |
29 |
+ 'options' => array('edit'), |
|
30 |
+ 'reference' => &$GLOBALS['TL_LANG']['MSC'], |
|
29 | 31 |
'inputType' => 'checkbox', |
30 |
- 'sql' => "char(1) NOT NULL default ''" |
|
32 |
+ 'sql' => "blob NULL" |
|
31 | 33 |
|
32 | 34 |
); |
... | ... |
@@ -16,7 +16,7 @@ use Contao\CoreBundle\DataContainer\PaletteManipulator; |
16 | 16 |
PaletteManipulator::create() |
17 | 17 |
->addLegend('sec_dl_legend','alexf_legend',PaletteManipulator::POSITION_BEFORE) |
18 | 18 |
->addField('sec_dl_access','sec_dl_legend',PaletteManipulator::POSITION_APPEND) |
19 |
- ->applyToPalette('default', 'tl_user'); |
|
19 |
+ ->applyToPalette('default', 'tl_user_group'); |
|
20 | 20 |
|
21 | 21 |
/** |
22 | 22 |
* Add fields to tl_user_group |
... | ... |
@@ -16,7 +16,7 @@ use Contao\CoreBundle\DataContainer\PaletteManipulator; |
16 | 16 |
PaletteManipulator::create() |
17 | 17 |
->addLegend('sec_dl_legend','alexf_legend',PaletteManipulator::POSITION_BEFORE) |
18 | 18 |
->addField('sec_dl_access','sec_dl_legend',PaletteManipulator::POSITION_APPEND) |
19 |
- ->applyToPalette('default'); |
|
19 |
+ ->applyToPalette('default', 'tl_user'); |
|
20 | 20 |
|
21 | 21 |
/** |
22 | 22 |
* Add fields to tl_user_group |
... | ... |
@@ -8,12 +8,15 @@ |
8 | 8 |
* @license commercial |
9 | 9 |
*/ |
10 | 10 |
|
11 |
+use Contao\CoreBundle\DataContainer\PaletteManipulator; |
|
11 | 12 |
|
12 | 13 |
/** |
13 | 14 |
* Extend a tl_user_group palette |
14 | 15 |
*/ |
15 |
-$GLOBALS['TL_DCA']['tl_user_group']['palettes']['default'] = str_replace(array('{alexf_legend}', '{alexf_legend:hide}'), '{sec_dl_legend:hide},sec_dl_access;{alexf_legend}', $GLOBALS['TL_DCA']['tl_user_group']['palettes']['default']); |
|
16 |
- |
|
16 |
+PaletteManipulator::create() |
|
17 |
+ ->addLegend('sec_dl_legend','alexf_legend',PaletteManipulator::POSITION_BEFORE) |
|
18 |
+ ->addField('sec_dl_access','sec_dl_legend',PaletteManipulator::POSITION_APPEND) |
|
19 |
+ ->applyToPalette('default'); |
|
17 | 20 |
|
18 | 21 |
/** |
19 | 22 |
* Add fields to tl_user_group |
... | ... |
@@ -26,4 +29,4 @@ $GLOBALS['TL_DCA']['tl_user_group']['fields']['sec_dl_access'] = array |
26 | 29 |
'inputType' => 'checkbox', |
27 | 30 |
'sql' => "char(1) NOT NULL default ''" |
28 | 31 |
|
29 |
-); |
|
30 | 32 |
\ No newline at end of file |
33 |
+); |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,29 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/** |
|
4 |
+ * SecureDownloads for Contao |
|
5 |
+ * |
|
6 |
+ * Copyright (c) 2017 Benjamin Roth |
|
7 |
+ * |
|
8 |
+ * @license commercial |
|
9 |
+ */ |
|
10 |
+ |
|
11 |
+ |
|
12 |
+/** |
|
13 |
+ * Extend a tl_user_group palette |
|
14 |
+ */ |
|
15 |
+$GLOBALS['TL_DCA']['tl_user_group']['palettes']['default'] = str_replace(array('{alexf_legend}', '{alexf_legend:hide}'), '{sec_dl_legend:hide},sec_dl_access;{alexf_legend}', $GLOBALS['TL_DCA']['tl_user_group']['palettes']['default']); |
|
16 |
+ |
|
17 |
+ |
|
18 |
+/** |
|
19 |
+ * Add fields to tl_user_group |
|
20 |
+ */ |
|
21 |
+$GLOBALS['TL_DCA']['tl_user_group']['fields']['sec_dl_access'] = array |
|
22 |
+( |
|
23 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_user_group']['sec_dl_access'], |
|
24 |
+ 'exclude' => true, |
|
25 |
+ 'filter' => true, |
|
26 |
+ 'inputType' => 'checkbox', |
|
27 |
+ 'sql' => "char(1) NOT NULL default ''" |
|
28 |
+ |
|
29 |
+); |
|
0 | 30 |
\ No newline at end of file |