Sha256: 8e902878fb9548381530dce8b3b3a1bfe8b4bb2fdf36594c2d63f7b7b5d23910
Contents?: true
Size: 1.41 KB
Versions: 16
Compression:
Stored size: 1.41 KB
Contents
= effective_form_with(model: [:admin, event_notification], engine: true) do |f| - if inline_datatable? = f.hidden_field :event_id - else = f.select :event_id, Effective::Event.sorted.all = f.select :category, Effective::EventNotification::CATEGORIES, label: 'Send an email notification' - # Render email templates - Effective::EventNotification::CATEGORIES.each do |category| - template = 'event_' + category.parameterize.underscore = f.show_if :category, category do = render "/admin/event_notifications/form_#{template}", f: f - if f.object.category == category && f.object.persisted? = f.select :from, mailer_froms_collection(), label: 'From' = f.text_field :subject = f.text_area :body, rows: 10 - else - email_template = Effective::EmailTemplate.where(template_name: template).first! - from_value = email_template.from || EffectiveResources.mailer_froms.first = f.select :from, mailer_froms_collection(), label: 'From', value: from_value = f.text_field :subject, value: email_template.subject = f.text_area :body, rows: 10, value: email_template.body %p The available variables are: %ul - Effective::EventNotification::EMAIL_TEMPLATE_VARIABLES.each do |variable| %li {{ #{variable} }} %small.text-muted Please contact us to add additional variables = effective_submit(f)
Version data entries
16 entries across 16 versions & 1 rubygems