Update admin notifications translatable fields

The same way we did for banners.

We needed to add new translation keys so the labels are displayed in the
correct language. I've kept the original `title` and `body` attributes
so they can be used in other places.

While backporting, we also added the original translations because they
hadn't been backported yet.
This commit is contained in:
Javi Martín
2018-10-08 15:52:46 +02:00
parent 96b3a37222
commit a326bcb0a1
7 changed files with 30 additions and 11 deletions

View File

@@ -63,8 +63,7 @@ class Admin::AdminNotificationsController < Admin::BaseController
private
def admin_notification_params
attributes = [:title, :body, :link, :segment_recipient,
*translation_params(AdminNotification)]
attributes = [:link, :segment_recipient, translation_params(AdminNotification)]
params.require(:admin_notification).permit(attributes)
end