FIX: Badge image uploader (#28188)

In the formkit conversion in 2ca06ba2360c200b2be8e0718fcc04c64ca14935
we missed setting a type for the UppyImageUploader for badges. Also,
we were not passing down the `image_url` as form data, so when we used
`data.image` for that field the badge was not updating in the UI after
page loads and the image URL was not loading for preview.

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
This commit is contained in:
Martin Brennan
2024-08-01 23:36:17 +10:00
committed by GitHub
parent 6ee6b1f1d1
commit 77081de027
10 changed files with 146 additions and 35 deletions

View File

@ -1,7 +1,13 @@
# frozen_string_literal: true
class AdminBadgeSerializer < BadgeSerializer
attributes :query, :trigger, :target_posts, :auto_revoke, :show_posts, :i18n_name
attributes :query,
:trigger,
:target_posts,
:auto_revoke,
:show_posts,
:i18n_name,
:image_upload_id
def include_long_description?
true