Bug #45125
closed
Hide "Create new relation" for FAL fields, if maxitems = 1 and an image is selected
Added by Tobias Klepp almost 12 years ago.
Updated about 7 years ago.
Category:
File Abstraction Layer (FAL)
Description
It would be a better useability, if the link "Create new relation" hide, when an image is selected and only one image is allowed.
I have the following code in my TCA definition:
'image' => array(
'exclude' => 1,
'label' => 'LLL:EXT:my_extkey/Resources/Private/Language/locallang_db.xlf:tx_myextkey_domain_model_tablename.image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('media', array('maxitems' => 1))
),
- Status changed from New to Accepted
I think this is a general problem with IRRE and should be tackled when cleaning up the backend Javascript code. Maybe it's also possible to do it right now - do you know Javascript and could dive into this? I'd also try to help if you get stuck somewhere.
I'd prefer a solution like it is for group fields since (i think) 4.6: if max 1 element is allowed, the existing relation should be replaced. No need to first delete it. For group fields, the visual indicator is simply the height of the selector box. I'm not sure how this could be implemented for the FAL fields, since there is just the link to add a relation.
Maybe adjusting the label is then enough, to tell a user that only one image / element is possible here?
Any news on how to proceed here? I'd really like a solution for 6.2, even if the label just tells "You can't add any more files"
Hi see #61031 there is a patch pending that introduces a message when max items is reached.
- Assignee set to Jan Helke
- Target version changed from 6.0.2 to 7.3 (Packages)
- PHP Version changed from 5.3 to 5.5
The code in typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php indicates, that the behavior Tobias wants is in fact indented by the core. As I stumbled upon this too, I can provide a patch for that.
- Tracker changed from Feature to Bug
- TYPO3 Version set to 7
- Complexity set to medium
- Is Regression set to No
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40157
- Target version changed from 7.3 (Packages) to 7.4 (Backend)
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40157
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40157
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40257
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40257
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40257
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40257
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40257
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF