ref: master
plugins/admin_notifications/views/shared/_form.html.erb
<% abstract_options = {:value => @notification.message, :style => 'width: 100%; height: 200px;', :class => current_editor('restricted')} %> <%= button :back, _('Back'), :controller => 'admin_notifications_plugin_admin' %> <%= form_for :notifications do |f| %> <%= labelled_form_field(_("Optional Title:"), f.text_field(:title, value: @notification.title)) %> <%= labelled_form_field(_("Enter your message here:"), f.text_area(:message, abstract_options)) %> <%= _("Obs: You can use %{name} and %{email} variables to put the user's name and email in the message.") %> <%= labelled_form_field(_('Notifications Status'), select(:notifications, :active, options_for_select_with_title({_("Active") => true, _("Inactive") => false}, @notification.active))) %> <%= labelled_form_field(_('Notifications Color/Type'), select(:notifications, :type, options_for_select_with_title({_("Blue - Information") => "AdminNotificationsPlugin::InformationNotification", _("Yellow - Warning") => "AdminNotificationsPlugin::WarningNotification", _("Green - Success") => "AdminNotificationsPlugin::SuccessNotification", _("Red - Danger") => "AdminNotificationsPlugin::DangerNotification"}, @notification.type))) %><%= labelled_check_box(profile.present? ? _("Display only in the profile homepage") : _("Display only in the homepage") , 'notifications[display_only_in_homepage]', '1', @notification.display_only_in_homepage?) %><%= labelled_check_box(_("Display to not logged users too"), 'notifications[display_to_all_users]', '1', @notification.display_to_all_users?) %><%= labelled_check_box(_("Display popup until user close the notification"), 'notifications[display_popup]', '1', @notification.display_popup?) %><%= button_bar do %> <%= submit_button 'save', _('Save'), :cancel => { :action => 'index' } %> <% end %> <% end %>