[Typo3-dev] Creating a wizard icon in TCA field with type user

Markus Lange markus.lange at bgm-gmbh.de
Thu Apr 21 17:02:29 CEST 2005


Thomas Hempel sagte:
> Unfortunately this doesn't work.
>
> This line in the class.t3lib_tceforms.php decides if the wizard icon is
> displayed or not:
>
> if (!$wConf['notNewRecords'] || t3lib_div::testInt($row['uid']))
>
> The problem is that the testInt($row['uid']) returns the uid of the newly
> created content
> element, because at this time it is allready created in the database. So
> it has an id and the
> testInt method will return true.
> Wether I set the "notNewRecords" to true or false, the if clause will
> allways be true, and so the
> icon is allways drawn.
>
> This is not happening if I use type text as field type. And so I ask if
> this is a bug or a
> feature. If it is a feature I don't understand it... ;)
>
> It might be that I call the renderWizards method with wrong parameters but
> I have no idea what
> I can do else.
>
> I think I have to affect the returnUrl so that the content element is
> edited when the wizard
> is closed. Or I have to find a way to disable the wizard when the element
> is created.
>
> I'm still interested in your opinions! :)

maybe i get you wrong:
i use a hidden input-field (see below) only for creating dependent records
(translation records for 3.5)

[config]
[type]=input
[wizards]
[_PADDING]=0
[_HIDDENFIELD]=1
[add]
[type]=userFunc
[notNewRecords]=0
[params]
[table]=tx_bgmjobposting_jobs_trans
[pid]=_STORAGE_PID
[fkey]=fkey
[typefield]=type
[userFunc]=tx_bgmlanguages_wizard_editLang->main

in this case the wizard only appears if the record is saved

hth

i am in a hurry
later..

btw:
t3lib_div::testInt should return false is id=NEW_hash

-- 
Markus Lange





More information about the TYPO3-dev mailing list