Sha256: b2170adc2e5e80d75f969504973bb83bc9a71145176ed4ab9be7c43a89504811

Contents?: true

Size: 1.94 KB

Versions: 2

Compression:

Stored size: 1.94 KB

Contents

= effective_form_with(model: [:admin, poll_notification], engine: true) do |f|
  - if inline_datatable?
    = f.hidden_field :poll_id
  - else
    = f.select :poll_id, Effective::Poll.sorted.editable.all

  = f.select :category, Effective::PollNotification::CATEGORIES,
    label: 'Send an email notification'

  = f.show_if :category, 'Upcoming reminder' do

    = f.select :reminder, Effective::PollNotification::UPCOMING_REMINDERS, label: false,
      hint: "before the poll starts on #{f.object.poll&.start_at&.strftime('%F')}."

    .alert.alert-warning
      %strong Upcoming Reminders
      are sent to the entire audience before the poll starts.
      %br
      Use upcoming reminders to advertise, prepare, or communicate to your audience before the poll begins.

  = f.show_if :category, 'When poll starts' do
    .alert.alert-warning
      %strong When poll starts
      notifications will be sent within 10 minutes of the poll start time.

  = f.show_if :category, 'Reminder' do

    = f.select :reminder, Effective::PollNotification::REMINDERS, label: false,
      hint: "after the poll starts on #{f.object.poll&.start_at&.strftime('%F')}."

    .alert.alert-warning
      %strong Reminders
      are sent to users in the audience who have not yet completed their ballot.
      %br
      Use reminders to boost your audience participation and remind people to vote.

  = f.show_if :category, 'When poll ends' do
    .alert.alert-warning
      %strong When poll ends
      notifications will be sent within 10 minutes of the poll end time.

  = f.text_field :subject, label: 'Email Subject'
  = f.text_area :body, label: 'Email Body'

  .alert.alert-warning
    Email content must not contain any personal details.
    %br
    This content will be sent in a mass email with hundreds of bcc'd recipients.

    - if poll_notification.poll.present?
      %br
      The url for this poll will be:
      = effective_polls.poll_url(poll_notification.poll)

  = effective_submit(f)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
effective_polls-0.0.2 app/views/admin/poll_notifications/_form.html.haml
effective_polls-0.0.1 app/views/admin/poll_notifications/_form.html.haml