Show warnings in edit forms.
Make all edit forms show warnings in addition to errors. Also render warnings and errors using DText. Currently this only affects artists and wiki pages because they're the only pages that have warnings.
This commit is contained in:
@@ -252,7 +252,11 @@ module ApplicationHelper
|
||||
|
||||
simple_form_for(model, **options) do |form|
|
||||
if model.try(:errors).try(:any?)
|
||||
concat tag.div(model.errors.full_messages.join("; "), class: "notice notice-error notice-small")
|
||||
concat tag.div(format_text(model.errors.full_messages.join("; ")), class: "notice notice-error notice-small prose")
|
||||
end
|
||||
|
||||
if model.try(:warnings).try(:any?)
|
||||
concat tag.div(format_text(model.warnings.full_messages.join("; ")), class: "notice notice-info notice-small prose")
|
||||
end
|
||||
|
||||
block.call(form)
|
||||
|
||||
Reference in New Issue
Block a user