Project

General

Profile

Actions

Bug #22228

closed

renderWizards with popup_onlyOpenIfSelected for drop down menu broken

Added by Juergen Deisenroth over 14 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-03-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If popup_onlyOpenIfSelected is set for wizard_edit.php at a record definition, there should be an alert message, if nothing is selected. This works only, if size is greater than 1. For size equal 1 there is a drop down menu generated and the first option is always selected. If the first option is empty or has a zero id, i would expect the alert message.

At t3lib_TCEforms::renderWizards the alert is inserted with this code
$addJS = $wConf['popup_onlyOpenIfSelected']?'if (!TBE_EDITOR.curSelected(\''.$itemName.$listFlag.'\')){alert('.$GLOBALS['LANG']->JScharCode(...

At jsfunc.tbe_editor.js::curSelected the return value is generated by this
retVal+=fObjSel.options[a].value+",";

So the return code for the first empty item is never empty and is
"0," for item("",0) generated by the kickstarter or
"," for item('', '')

As a result of this behaviour a empty edit popup is opened.

example code snipped:

'type' => array (
'exclude' => 0,
'label' => 'Type',
'config' => array (
'type' => 'select',
'foreign_table' => 'tx_test_type',
'foreign_table_where' => 'ORDER BY tx_test_type.uid',
'size' => 1,
'minitems' => 0,
'maxitems' => 1,
'wizards' => array(
'_PADDING' => 2,
'_VERTICAL' => 1,
'edit' => array(
'type' => 'popup',
'title' => 'Edit',
'script' => 'wizard_edit.php',
'popup_onlyOpenIfSelected' => 1,
'icon' => 'edit2.gif',
'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
),
),
)
),

(issue imported from #M13730)

Actions #1

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #2

Updated by Alexander Opitz about 11 years ago

  • Status changed from Needs Feedback to Closed
  • Is Regression set to No

No feedback for over 90 days.

Actions

Also available in: Atom PDF