Created
October 7, 2014 20:15
-
-
Save katgirl/3b28f1e22ba076e7ade7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Contao Open Source CMS | |
* | |
* Copyright (C) 2014 Kirsten Roschanski | |
* | |
* @package registration_gtc | |
* @link https://contao.org | |
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL | |
*/ | |
/** | |
* Add palette | |
*/ | |
$GLOBALS['TL_DCA']['tl_member']['palettes']['default'] = | |
str_replace( | |
';{account_legend}', | |
';{registration_legend:hide},gtc,disclaimer,licence_agreement;{account_legend}', | |
$GLOBALS['TL_DCA']['tl_member']['palettes']['default'] | |
); | |
/** | |
* Add fields | |
*/ | |
$GLOBALS['TL_DCA']['tl_member']['fields']['gtc'] = array | |
( | |
'label' => &$GLOBALS['TL_LANG']['tl_member']['gtc'], | |
'exclude' => true, | |
'filter' => true, | |
'inputType' => 'checkbox', | |
'eval' => array('mandatory'=>true, 'feEditable'=>true, 'feViewable'=>true, 'feGroup'=>'login', 'tl_class'=>'w50 wizard'), | |
'sql' => "char(1) NOT NULL default ''" | |
); | |
$GLOBALS['TL_DCA']['tl_member']['fields']['disclaimer'] = array | |
( | |
'label' => &$GLOBALS['TL_LANG']['tl_member']['disclaimer'], | |
'exclude' => true, | |
'filter' => true, | |
'inputType' => 'checkbox', | |
'eval' => array('mandatory'=>true, 'feEditable'=>true, 'feViewable'=>true, 'feGroup'=>'login', 'tl_class'=>'w50 wizard'), | |
'sql' => "char(1) NOT NULL default ''" | |
); | |
$GLOBALS['TL_DCA']['tl_member']['fields']['licence_agreement'] = array | |
( | |
'label' => &$GLOBALS['TL_LANG']['tl_member']['licence_agreement'], | |
'exclude' => true, | |
'filter' => true, | |
'inputType' => 'checkbox', | |
'eval' => array('mandatory'=>true, 'feEditable'=>true, 'feViewable'=>true, 'feGroup'=>'login', 'tl_class'=>'w50 wizard'), | |
'sql' => "char(1) NOT NULL default ''" | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Contao Open Source CMS | |
* | |
* Copyright (C) 2014 Kirsten Roschanski | |
* | |
* @package registration_gtc | |
* @link https://contao.org | |
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL | |
*/ | |
/** | |
* Add palette | |
*/ | |
$GLOBALS['TL_DCA']['tl_module']['palettes']['personalData'] = str_replace | |
( | |
';{redirect_legend}', | |
';{registration_legend:hide},gtc_page,disclaimer_page,licence_agreement_page;{redirect_legend}', | |
$GLOBALS['TL_DCA']['tl_module']['palettes']['personalData'] | |
); | |
$GLOBALS['TL_DCA']['tl_module']['palettes']['registration'] = str_replace | |
( | |
';{redirect_legend}', | |
';{registration_legend:hide},gtc_page,disclaimer_page,licence_agreement_page;{redirect_legend}', | |
$GLOBALS['TL_DCA']['tl_module']['palettes']['registration'] | |
); | |
/** | |
* Add fields | |
*/ | |
$GLOBALS['TL_DCA']['tl_module']['fields']['gtc_page'] = array | |
( | |
'label' => &$GLOBALS['TL_LANG']['tl_module']['gtc_page'], | |
'exclude' => true, | |
'inputType' => 'pageTree', | |
'foreignKey' => 'tl_page.title', | |
'eval' => array('fieldType'=>'radio'), | |
'sql' => "int(10) unsigned NOT NULL default '0'", | |
'relation' => array('type'=>'hasOne', 'load'=>'eager') | |
); | |
$GLOBALS['TL_DCA']['tl_module']['fields']['disclaimer_page'] = array | |
( | |
'label' => &$GLOBALS['TL_LANG']['tl_module']['disclaimer_page'], | |
'exclude' => true, | |
'inputType' => 'pageTree', | |
'foreignKey' => 'tl_page.title', | |
'eval' => array('fieldType'=>'radio'), | |
'sql' => "int(10) unsigned NOT NULL default '0'", | |
'relation' => array('type'=>'hasOne', 'load'=>'eager') | |
); | |
$GLOBALS['TL_DCA']['tl_module']['fields']['licence_agreement_page'] = array | |
( | |
'label' => &$GLOBALS['TL_LANG']['tl_module']['licence_agreement_page'], | |
'exclude' => true, | |
'inputType' => 'pageTree', | |
'foreignKey' => 'tl_page.title', | |
'eval' => array('fieldType'=>'radio'), | |
'sql' => "int(10) unsigned NOT NULL default '0'", | |
'relation' => array('type'=>'hasOne', 'load'=>'eager') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment