| ... | ... |
@@ -19,7 +19,7 @@ |
| 19 | 19 |
$GLOBALS['TL_DCA']['tl_page']['palettes']['root'] = str_replace('{meta_legend}', '{cookiepolicy_legend:hide},esm_cookiepolicy_check;{meta_legend}',$GLOBALS['TL_DCA']['tl_page']['palettes']['root']);
|
| 20 | 20 |
$GLOBALS['TL_DCA']['tl_page']['palettes']['regular'] = str_replace('{meta_legend}', '{cookiepolicy_legend:hide},esm_cookiepolicy_ignore;{meta_legend}',$GLOBALS['TL_DCA']['tl_page']['palettes']['regular']);
|
| 21 | 21 |
$GLOBALS['TL_DCA']['tl_page']['palettes']['__selector__'][] = 'esm_cookiepolicy_check'; |
| 22 |
-$GLOBALS['TL_DCA']['tl_page']['subpalettes']['esm_cookiepolicy_check'] = 'esm_cookiepolicy_jumpTo'; |
|
| 22 |
+$GLOBALS['TL_DCA']['tl_page']['subpalettes']['esm_cookiepolicy_check'] = 'esm_cookiepolicy_jumpTo,esm_cookiepolicy_text'; |
|
| 23 | 23 |
|
| 24 | 24 |
/** |
| 25 | 25 |
* Fields |
| ... | ... |
@@ -50,4 +50,21 @@ $GLOBALS['TL_DCA']['tl_page']['fields']['esm_cookiepolicy_ignore'] = array |
| 50 | 50 |
'exclude' => true, |
| 51 | 51 |
'inputType' => 'checkbox', |
| 52 | 52 |
'sql' => "char(1) NOT NULL default ''" |
| 53 |
+); |
|
| 54 |
+ |
|
| 55 |
+$GLOBALS['TL_DCA']['tl_page']['fields']['esm_cookiepolicy_text'] = array |
|
| 56 |
+( |
|
| 57 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_page']['esm_cookiepolicy_text'], |
|
| 58 |
+ 'exclude' => true, |
|
| 59 |
+ 'inputType' => 'textarea', |
|
| 60 |
+ 'load_callback' => array |
|
| 61 |
+ ( |
|
| 62 |
+ array('\eSM_cookiepolicy\tl_page', 'setDefaultCookieText')
|
|
| 63 |
+ ), |
|
| 64 |
+ 'save_callback' => array |
|
| 65 |
+ ( |
|
| 66 |
+ array('\eSM_cookiepolicy\tl_page', 'setDefaultCookieText')
|
|
| 67 |
+ ), |
|
| 68 |
+ 'eval' => array('rte'=>'tinyMCE', 'minlen'=>1, 'allowHtml'=>true),
|
|
| 69 |
+ 'sql' => "text NULL" |
|
| 53 | 70 |
); |
| 54 | 71 |
\ No newline at end of file |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,53 @@ |
| 1 |
+<?php |
|
| 2 |
+ |
|
| 3 |
+/** |
|
| 4 |
+ * eSales Media Cookie Policy |
|
| 5 |
+ * |
|
| 6 |
+ * Copyright (C) 2013-2015 eSalesMedia |
|
| 7 |
+ * |
|
| 8 |
+ * @package eSM_cookiepolicy |
|
| 9 |
+ * @link http://www.esales-media.de |
|
| 10 |
+ * @license commercial |
|
| 11 |
+ * |
|
| 12 |
+ * @author Benjamin Roth <benjamin@esales-media.de> |
|
| 13 |
+ */ |
|
| 14 |
+ |
|
| 15 |
+ |
|
| 16 |
+/** |
|
| 17 |
+ * Palettes |
|
| 18 |
+ */ |
|
| 19 |
+$GLOBALS['TL_DCA']['tl_page']['palettes']['root'] = str_replace('{meta_legend}', '{cookiepolicy_legend:hide},esm_cookiepolicy_check;{meta_legend}',$GLOBALS['TL_DCA']['tl_page']['palettes']['root']);
|
|
| 20 |
+$GLOBALS['TL_DCA']['tl_page']['palettes']['regular'] = str_replace('{meta_legend}', '{cookiepolicy_legend:hide},esm_cookiepolicy_ignore;{meta_legend}',$GLOBALS['TL_DCA']['tl_page']['palettes']['regular']);
|
|
| 21 |
+$GLOBALS['TL_DCA']['tl_page']['palettes']['__selector__'][] = 'esm_cookiepolicy_check'; |
|
| 22 |
+$GLOBALS['TL_DCA']['tl_page']['subpalettes']['esm_cookiepolicy_check'] = 'esm_cookiepolicy_jumpTo'; |
|
| 23 |
+ |
|
| 24 |
+/** |
|
| 25 |
+ * Fields |
|
| 26 |
+ */ |
|
| 27 |
+$GLOBALS['TL_DCA']['tl_page']['fields']['esm_cookiepolicy_check'] = array |
|
| 28 |
+( |
|
| 29 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_page']['esm_cookiepolicy_check'], |
|
| 30 |
+ 'exclude' => true, |
|
| 31 |
+ 'inputType' => 'checkbox', |
|
| 32 |
+ 'eval' => array('submitOnChange'=>true),
|
|
| 33 |
+ 'sql' => "char(1) NOT NULL default ''" |
|
| 34 |
+); |
|
| 35 |
+ |
|
| 36 |
+$GLOBALS['TL_DCA']['tl_page']['fields']['esm_cookiepolicy_jumpTo'] = array |
|
| 37 |
+( |
|
| 38 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_page']['esm_cookiepolicy_jumpTo'], |
|
| 39 |
+ 'exclude' => true, |
|
| 40 |
+ 'inputType' => 'pageTree', |
|
| 41 |
+ 'foreignKey' => 'tl_page.title', |
|
| 42 |
+ 'eval' => array('fieldType'=>'radio', 'mandatory'=>true),
|
|
| 43 |
+ 'sql' => "int(10) unsigned NOT NULL default '0'", |
|
| 44 |
+ 'relation' => array('type'=>'hasOne', 'load'=>'lazy')
|
|
| 45 |
+); |
|
| 46 |
+ |
|
| 47 |
+$GLOBALS['TL_DCA']['tl_page']['fields']['esm_cookiepolicy_ignore'] = array |
|
| 48 |
+( |
|
| 49 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_page']['esm_cookiepolicy_ignore'], |
|
| 50 |
+ 'exclude' => true, |
|
| 51 |
+ 'inputType' => 'checkbox', |
|
| 52 |
+ 'sql' => "char(1) NOT NULL default ''" |
|
| 53 |
+); |
|
| 0 | 54 |
\ No newline at end of file |