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.
20 lines
770 B
Plaintext
20 lines
770 B
Plaintext
<%= render "admin/shared/globalize_locales", resource: @admin_notification %>
|
|
|
|
<%= translatable_form_for [:admin, @admin_notification] do |f| %>
|
|
<%= render 'shared/errors', resource: @admin_notification %>
|
|
|
|
<%= f.select :segment_recipient, options_for_select(user_segments_options,
|
|
@admin_notification[:segment_recipient]) %>
|
|
<%= f.text_field :link %>
|
|
|
|
<%= f.translatable_fields do |translations_form| %>
|
|
<%= translations_form.text_field :title %>
|
|
<%= translations_form.text_area :body %>
|
|
<% end %>
|
|
|
|
<div class="margin-top">
|
|
<%= f.submit t("admin.admin_notifications.#{admin_submit_action(@admin_notification)}.submit_button"),
|
|
class: "button success" %>
|
|
</div>
|
|
<% end %>
|