Project

General

Profile

Bug #77972

Updated by Hendrik Putzek over 7 years ago

If a backend field for inserting an image is configured like 
 <pre> 
 <maxitems>1</maxitems> 
 <minitems>1</minitems> 
 </pre> 
 the button to add a new relation is hidden by inline style "display:none". (Which is correct) 

 But if the image is deleted by using the trashcan icon, the upload button does not show up again. 

 This leads to the following behaviour:  
 * Its not possible to save the form (validation says there must be at least one image) 
 * Its not possible to add another image and therefore make the form valid because of the missing upload button 

 The Buttons are hidden in typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php:247 

 In https://forge.typo3.org/issues/45125 is stated that: 
 "The buttons are not immediately 
 hidden/shown if the number of relation changes. That would involve 
 JavaScript magic and could be done in a follow up." 

 That Javascript seems to be not implemented yet. 

 --- 

 Steps to reproduce: 

 * Create a flexform including an inline field for inserting an image. 
 Set 
 <pre> 
 <maxitems>1</maxitems> 
 <minitems>1</minitems> 
 </pre> 
 * Upload one image and save the form 
 * The upload button is hidden 
 * Delete the uploaded image using the trashcan icon 
 * *The upload button does not show up again* 

Back