Bug #22679
closedImprove usability of group fields
100%
Description
If you set
'disable_controls'=>'list'
you can once upload an image (or file). But because of a missing Delete-Button you never are able to change this image (or file) later.
It's a pitty, that this doesn't work, because 'disable_controls'=>'list' renders for single files much more 'pretty'.
https://review.typo3.org/#change,1142
Solution could be, to add the delete Button, even if the list is not shown.
This works (i tried), but you dont get an visual respose, that the existing image will be deleted and replaced by the new one.
Other option would be, to add a new property, that automatically deletes existing entries, if maxitems=1 and so always replaces exisitng images (files).
(issue imported from #M14430)
Files
Updated by Stefan Geith about 14 years ago
Solution:
'disable_controls'=>'list'
should only remove the list, not the delete-button.
'disable_controls'=>'list,delete'
should only remove the list AND the delete-button.
Attached Patch does this.
Updated by Alexander Stehlik over 13 years ago
This was fixed in f92873b30c59ca7bc7902617991175834589a11e and can be closed.
Updated by Xavier Perseguers over 13 years ago
- Target version changed from 1081 to 1238
Updated by Georg Ringer about 13 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Updated by Stefan Geith about 13 years ago
Sorry, but this was NOT fixed in f92873b30c59ca7bc7902617991175834589a11e
If you use
'disable_controls' => 'list'
then you will NEVER be able to delete this image again.
You may replace it with others, because now with maxitems=1 the image will be replaced,
BUT there is missing a way to DELETE the image, if you want to remove it completely.
Only alternative in the moment is to replace it by clear.gif :(
Updated by Steffen Gebert about 13 years ago
- Status changed from Resolved to New
- Target version changed from 1238 to 4.6.0-beta1
Updated by Xavier Perseguers about 13 years ago
- Target version changed from 4.6.0-beta1 to 4.6.0-beta2
Updated by Stefan Geith about 13 years ago
Needs verify + code review https://review.typo3.org/3347
Updated by Thorsten Kahler about 13 years ago
- Category set to FormEngine aka TCEforms
- Status changed from New to Under Review
- PHP Version changed from 5.2 to 5.3
- Complexity set to medium
Updated by Stefan Geith almost 13 years ago
I created a demo extension, that shows the Problem.
- Install the extension 'user_demo_tca_files'
- Create a record of type 'Demo for TCA Type group-file' (listed under System Records)
- Upload an image-file to all three fields
- Try to upload another image to all three fields:
Will add to the first (maxitems=5), Will replace exisiting in the next two (maxitmes=1)
So far - all OK
- Try to remove all images from all three fields:
Field 1+2: images can be removed
Last field: there IS NO REMOVE-Button, so this image can never be removed ...
- Try https://review.typo3.org/#change,3347
Last field HAS Remove-Button.
Why is this important?
Look at the TCA-Form: which of the two maxitems=1 fields looks better ?
I think, for single images (or files) the imagelist is useless and it looks much better to simply display the thumbnail.
Updated by Xavier Perseguers almost 13 years ago
- Target version changed from 4.6.0-beta2 to 4.6.0-beta3
Updated by Andreas Wolf almost 13 years ago
Ok, I see the point with the maxitems=1 case - we could hide the list for this case, and still show it (without the move controls) for maxitems > 1. Otherwise all (!) files are deleted when using the delete button if the list is not shown.
Updated by Stefan Geith almost 13 years ago
IF you set (manually) to NOT display the list,
then (at least for me) it seems clear, that with 'delete', the whole list is cleared.
Its up to the developpers to set the right values in TCA, so if you set this with maxitmes>1, you have to know, that delete will delete all files.
Updated by Andreas Wolf almost 13 years ago
Yeah, right. Thought about that a bit longer now - and your approach is more logical than mine (I would have displayed the list for maxitems>1 if the delete button is shown - but that is a breaking change I guess).
Updated by Andreas Wolf almost 13 years ago
- Status changed from Under Review to Resolved
Stefan, could you add documentation for this to the list of pending documentation on wiki.typo3.org?
Updated by Stefan Geith almost 13 years ago
Updated pending documentation on wiki.typo3.org
Updated by Stefan Geith almost 13 years ago
- File disable_controls.png disable_controls.png added
Updated by Stefan Geith almost 13 years ago
- File disable_controls.png disable_controls.png added
Better version of example-image uploaded
Updated by Riccardo De Contardi almost 7 years ago
- Status changed from Resolved to Closed