Sha256: 15e287cf4c74852da038a38abe29104cae5394c720044adbe04838efb376b544

Contents?: true

Size: 1.57 KB

Versions: 28

Compression:

Stored size: 1.57 KB

Contents

= form.hidden_field :email_form_action, value: email_action

- if email_template.present? && !email_skip_link
  %p The following #{link_to(email_template, effective_email_templates.edit_admin_email_template_path(email_template), target: '_blank')} email will be sent:

- if email_skip
  = form.check_box :email_form_skip, label: 'Do not send email'

= form.hide_if :email_form_skip, true do
  - if email_to.present?
    = form.static_field :email_form_to, label: 'To', value: (email_to.try(:email) || email_to)

  - # With errors
  - if form.object.errors.present?
    = form.select :email_form_from, mailer_froms_collection(), label: 'From'
    = form.text_field :email_form_subject, label: 'Subject'

    - if email_content_type == 'text/html'
      = form.article_editor :email_form_body, label: 'Body', mode: :email
    - else
      = form.text_area :email_form_body, label: 'Body', rows: 10
  
  - # With no errors
  - if form.object.errors.blank?
    = form.select :email_form_from, mailer_froms_collection(), label: 'From', value: email_from
    = form.text_field :email_form_subject, label: 'Subject', value: email_subject

    - if email_content_type == 'text/html'
      = form.article_editor :email_form_body, label: 'Body', mode: :email, value: email_body
    - else
      = form.text_area :email_form_body, label: 'Body', rows: 10, value: email_body

  - if email_variables.present?
    = card do
      %p The available variables are:

      %ul
        - email_variables.each do |variable|
          %li {{ #{variable} }}

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

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
effective_resources-2.27.9 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.27.8 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.27.7 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.27.6 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.27.5 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.27.4 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.27.3 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.27.2 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.27.1 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.27.0 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.26.5 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.26.4 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.26.3 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.26.2 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.26.1 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.26.0 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.25.16 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.25.15 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.25.14 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.25.13 app/views/effective/acts_as_email_form/_fields.html.haml