[TYPO3-core] RFC: Flexforms patch
Kasper Skårhøj
kasper2005 at typo3.com
Sat Oct 1 21:39:53 CEST 2005
ok
On Sat, 2005-10-01 at 21:27, Bernhard Kraft wrote:
> Hallo,
>
>
> This is a CVS patch request.
>
>
> Type: Feature
>
>
> Description:
> You can set the "requestUpdate" field in the "ctrl" section of a TCA
> table and if set to valid fields the User will get asked to reload the
> page if he changes those fields.
>
> This does not work for Flexform Fields as the required JS is not set.
> This patch fixes this problem.
>
> Branches:
> HEAD
>
>
>
> greets,
> Bernhard
>
> ______________________________________________________________________
> diff -ru TYPO3core/t3lib/class.t3lib_tceforms.php TYPO3core.test/t3lib/class.t3lib_tceforms.php
> --- TYPO3core/t3lib/class.t3lib_tceforms.php 2005-09-14 13:35:02.000000000 +0200
> +++ TYPO3core.test/t3lib/class.t3lib_tceforms.php 2005-10-01 21:20:48.016594856 +0200
> @@ -2152,7 +2152,16 @@
> 'defaultExtras' => $value['TCEforms']['defaultExtras'],
> 'displayCond' => $value['TCEforms']['displayCond'], // Haven't tested this...
> );
> + if (
> + (($GLOBALS['TCA'][$table]['ctrl']['type'] && !strcmp($key,$GLOBALS['TCA'][$table]['ctrl']['type'])) ||
> + ($GLOBALS['TCA'][$table]['ctrl']['requestUpdate'] && t3lib_div::inList($GLOBALS['TCA'][$table]['ctrl']['requestUpdate'],$key)))
> + && !$GLOBALS['BE_USER']->uc['noOnChangeAlertInTypeFields']) {
> + $alertMsgOnChange = 'if (confirm('.$GLOBALS['LANG']->JScharCode($this->getLL('m_onChangeAlert')).') && TBE_EDITOR_checkSubmit(-1)){ TBE_EDITOR_submitForm() };';
> + } else {$alertMsgOnChange='';}
> $fakePA['fieldChangeFunc']=$PA['fieldChangeFunc'];
> + if (strlen($alertMsgOnChange)) {
> + $fakePA['fieldChangeFunc']['alert']=$alertMsgOnChange;
> + }
> $fakePA['onFocus']=$PA['onFocus'];
> $fakePA['label']==$PA['label'];
>
>
> ______________________________________________________________________
> _______________________________________________
> Typo3-team-core mailing list
> Typo3-team-core at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-core
--
- kasper
TYPO3 Association Chairman
-----
"Don't Mess With Texas!"
More information about the TYPO3-team-core
mailing list