mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 01:25:54 +08:00
77081de027
In the formkit conversion in 2ca06ba236
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>
20 lines
359 B
Ruby
20 lines
359 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AdminBadgeSerializer < BadgeSerializer
|
|
attributes :query,
|
|
:trigger,
|
|
:target_posts,
|
|
:auto_revoke,
|
|
:show_posts,
|
|
:i18n_name,
|
|
:image_upload_id
|
|
|
|
def include_long_description?
|
|
true
|
|
end
|
|
|
|
def include_i18n_name?
|
|
object.system?
|
|
end
|
|
end
|