1212use Ibexa \Contracts \Core \Repository \FieldTypeService ;
1313use JMS \TranslationBundle \Annotation \Desc ;
1414use Symfony \Component \Form \Extension \Core \Type \CheckboxType ;
15- use Symfony \Component \Form \Extension \Core \Type \IntegerType ;
15+ use Symfony \Component \Form \Extension \Core \Type \NumberType ;
1616use Symfony \Component \Form \FormInterface ;
1717use Symfony \Component \OptionsResolver \OptionsResolver ;
1818use Symfony \Component \Validator \Constraints \Range ;
@@ -31,7 +31,7 @@ public function mapFieldDefinitionForm(FormInterface $fieldDefinitionForm, Field
3131 {
3232 $ isTranslation = $ data ->contentTypeData ->languageCode !== $ data ->contentTypeData ->mainLanguageCode ;
3333 $ fieldDefinitionForm
34- ->add ('maxSize ' , IntegerType ::class, [
34+ ->add ('maxSize ' , NumberType ::class, [
3535 'required ' => false ,
3636 'property_path ' => 'validatorConfiguration[FileSizeValidator][maxFileSize] ' ,
3737 'label ' => /** @Desc("Maximum file size (MB)") */ 'field_definition.ezimage.max_file_size ' ,
@@ -46,6 +46,7 @@ public function mapFieldDefinitionForm(FormInterface $fieldDefinitionForm, Field
4646 'max ' => $ this ->maxUploadSize ->get (MaxUploadSize::MEGABYTES ),
4747 ],
4848 'disabled ' => $ isTranslation ,
49+ 'scale ' => 1 ,
4950 ])
5051 ->add ('isAlternativeTextRequired ' , CheckboxType::class, [
5152 'required ' => false ,
0 commit comments