[TYPO3-core] RFC: #6046 requestUpdate does not work on selectboxes (group-fields)

Ingmar Schlecht ingmar at typo3.org
Sat Oct 27 22:30:50 CEST 2007


Here are some comments:
 - Please correct the indentation of the added code in browser_links
   (tabs instead of spaces)
 - Add a comment to "if($pArr[8]){" explaining what $pArr[8] is.

I would prefer the confirm() window to appear on the form instead of
within the object browser. What do you think about this:
   p = parent.window.opener;
   p.setTimeout(\'if(confirm(window.TBE_EDITOR.labels.onChangeAlert) &&
window.TBE_EDITOR.checkSubmit(-1)){window.TBE_EDITOR.submitForm()}\', 10);

Could you write a new patch (based on latest trunk) taking the above
comments into account?

cheers
Ingmar


Stephan Petzl schrieb:
> This is an SVN patch request.
> 
> Type: Bugfix
> 
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=6046
> 
> Branches:
> Trunk
> 
> Problem:
> when i set requestUpdate on group-fields in TCA, i get no page-reload
> after modifying the input of the field in the BE.
> RequestUpdate is not passed through to the method "dbFileIcons()" in the
> file class.t3lib_tceforms.php
> which renders the selectbox and icons.
> 
> Solution:
> 1.) pass the requestUpdate (just like in other fields) through to the
> render-method (dbFileIcons)
> This is done by setting the $param['alert'] with javascript for reload
> in method "getSingleField_typeGroup(...)" before passing this array to
> "dbFileIcons(...)".
> 2.) add the javascript to the image-buttons in "dbFileIcons" so that the
> user is prompted for a page reload.
> 3.) pass a the flag "$refresh" to the record-browser:
> $aOnClick='setFormValueOpenBrowser(\''.$mode.'\',\''.($fName.'|||'.$allowed.'|'.$aOnClickInline.'||||'.$refresh).'\');
> return false;';
> this tells the recordbrowser if page has to be reloaded after adding
> records to the field
> 4.) in class.browse_links.php generate javascript for prompting the user
> to reload the page (if flag was set in step 3.)
> 
> Notes:
> I m not sure about setting the flag in step 3.)
> the parameters which are passed to setFormValueBrowser are fully
> undocumented as far as i can see. (why??)
> added the parameter just at the last position, which is not used till now.
> 
> 
> Stephan Petzl
> 
> 


-- 
Ingmar Schlecht
TYPO3 Association Active Member


More information about the TYPO3-team-core mailing list