Sha256: baa538db242dc51a996716ea23bc6e00e5864ec971f5667bce85e0a55d2520cf

Contents?: true

Size: 1.22 KB

Versions: 1

Compression:

Stored size: 1.22 KB

Contents

= effective_form_with(model: email_template, url: email_template.persisted? ? effective_email_templates.admin_email_template_path(email_template.id) : effective_email_templates.admin_email_templates_path) do |f|
  = f.static_field :template_name, label: 'Name'

  - if EffectiveEmailTemplates.select_content_type
    = f.select :content_type, Effective::EmailTemplate::CONTENT_TYPES

  = f.select :from, mailer_froms_collection(), hint: 'Please contact us to add additional sender addresses. Please refresh the page if this from address looks weird.'
  = f.text_field :cc
  = f.text_field :bcc

  - prefix_hint = EffectiveResources.mailer_subject_prefix_hint.to_s.strip.presence

  = f.text_field :subject,
    hint: (prefix_hint ? "The subject of your email. It will be automatically prefixed with #{prefix_hint}." : 'The subject of your email')

  = f.text_area :body, hint: 'The content of your email template', rows: 10

  .card
    .card-body
      %p The available variables for this email template are:

      %ul
        - Array(f.object.template_variables).each do |variable|
          %li {{ #{variable} }}

      %small.text-muted Please contact us to add additional variables

  = f.submit do
    = f.save 'Save'
    = f.save 'Continue'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
effective_email_templates-1.7.0 app/views/admin/email_templates/_form.html.haml