Sha256: 4d8085078650eb51b39b7bad2eccc124bf3dd4b1f3a83c8c9ada1948cf42199a

Contents?: true

Size: 1.37 KB

Versions: 6

Compression:

Stored size: 1.37 KB

Contents

= form.hidden_field :email_form_action, value: email_action

- 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

6 entries across 6 versions & 1 rubygems

Version Path
effective_resources-2.25.4 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.25.3 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.25.2 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.25.1 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.25.0 app/views/effective/acts_as_email_form/_fields.html.haml
effective_resources-2.24.0 app/views/effective/acts_as_email_form/_fields.html.haml