Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Should have
Assignee:
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2013-02-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.5
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

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))
),


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #61031: Implement flash message warning when max number of items is reached in IRRE fieldClosedNikola Stojiljković2014-08-18

Actions
Related to TYPO3 Core - Bug #77972: Missing upload buttons in inline fieldClosed2016-09-16

Actions
Actions #1

Updated by Andreas Wolf almost 12 years ago

  • 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.

Actions #2

Updated by Andreas Kießling almost 12 years ago

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?

Actions #3

Updated by Andreas Kießling about 10 years ago

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"

Actions #4

Updated by Frans Saris about 10 years ago

Hi see #61031 there is a patch pending that introduces a message when max items is reached.

Actions #5

Updated by Jan Helke over 9 years ago

  • 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.

Actions #6

Updated by Jan Helke over 9 years ago

  • Tracker changed from Feature to Bug
  • TYPO3 Version set to 7
  • Complexity set to medium
  • Is Regression set to No
Actions #7

Updated by Gerrit Code Review over 9 years ago

  • 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

Actions #8

Updated by Benni Mack over 9 years ago

  • Target version changed from 7.3 (Packages) to 7.4 (Backend)
Actions #9

Updated by Gerrit Code Review over 9 years ago

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

Actions #10

Updated by Gerrit Code Review over 9 years ago

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

Actions #11

Updated by Gerrit Code Review over 9 years ago

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

Actions #12

Updated by Gerrit Code Review over 9 years ago

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

Actions #13

Updated by Gerrit Code Review over 9 years ago

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

Actions #14

Updated by Gerrit Code Review over 9 years ago

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

Actions #15

Updated by Gerrit Code Review over 9 years ago

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

Actions #16

Updated by Jonathan IROULIN over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #17

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF