Skip to content

Commit

Permalink
Fix uploads on self-service ticket form reload
Browse files Browse the repository at this point in the history
fixes #13793
  • Loading branch information
cedric-anne authored and trasher committed Jan 24, 2023
1 parent 44938e7 commit eb3cf86
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions templates/components/itilobject/selfservice.html.twig
Expand Up @@ -232,13 +232,22 @@
right_field_options
) }}

{% set uploads = [] %}
{% if params._content is defined %}
{% set uploads = uploads|merge({'_content': params._content, '_tag_content': params._tag_content}) %}
{% endif %}
{% if params._filename is defined %}
{% set uploads = uploads|merge({'_filename': params._filename, '_tag_filename': params._tag_filename}) %}
{% endif %}

{{ fields.textareaField(
'content',
params['content'],
__('Description'),
right_field_options|merge({
'enable_richtext': true,
'enable_fileupload': (itiltemplate.isHiddenField('_documents_id')) ? false : true,
'uploads': uploads,
})
) }}
</div>
Expand Down

0 comments on commit eb3cf86

Please sign in to comment.