Skip to content

Commit 6e4a4fe

Browse files
Add a checkbox to prohabit copy and paste (see #11)
1 parent 545038c commit 6e4a4fe

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/Resources/contao/dca/tl_form_field.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* Contao Open Source CMS
5-
* Copyright (C) 2005-2023 Leo Feyer
5+
* Copyright (C) 2005-2025 Leo Feyer
66
*
77
* Formerly known as TYPOlight Open Source CMS.
88
*
@@ -21,7 +21,7 @@
2121
* Software Foundation website at <http://www.gnu.org/licenses/>.
2222
*
2323
* PHP version 5
24-
* @copyright Cliff Parnitzky 2012-2023
24+
* @copyright Cliff Parnitzky 2012-2025
2525
* @author Cliff Parnitzky
2626
* @package CheckedEmail
2727
* @license LGPL
@@ -30,7 +30,7 @@
3030
/**
3131
* Add a palette to tl_form_field
3232
*/
33-
$GLOBALS['TL_DCA']['tl_form_field']['palettes']['checkedEmail'] = '{type_legend},type,name,label,confirmLabel;{fconfig_legend},mandatory,placeholder;{expert_legend:hide},class,value,minlength,maxlength,accesskey,tabindex;{template_legend:hide},customTpl;{invisible_legend:hide},invisible';
33+
$GLOBALS['TL_DCA']['tl_form_field']['palettes']['checkedEmail'] = '{type_legend},type,name,label,confirmLabel;{fconfig_legend},mandatory,placeholder;{expert_legend:hide},class,value,minlength,maxlength,accesskey,tabindex;{template_legend:hide},customTpl,disableCopyPaste;{invisible_legend:hide},invisible';
3434

3535
/**
3636
* Fields
@@ -43,3 +43,11 @@
4343
'eval' => array('maxlength'=>255, 'tl_class'=>'w50'),
4444
'sql' => "varchar(255) NOT NULL default ''"
4545
);
46+
$GLOBALS['TL_DCA']['tl_form_field']['fields']['disableCopyPaste'] = array
47+
(
48+
'label' => &$GLOBALS['TL_LANG']['tl_form_field']['disableCopyPaste'],
49+
'exclude' => true,
50+
'inputType' => 'checkbox',
51+
'eval' => array('tl_class'=>'clr w50'),
52+
'sql' => "char(1) COLLATE ascii_bin NOT NULL default ''"
53+
);

0 commit comments

Comments
 (0)