Sha256: 4990ddc86b1c5e2a6f3f8d30185a5589156e05cd63f5eb89e09c12430b0e287e

Contents?: true

Size: 1.98 KB

Versions: 31

Compression:

Stored size: 1.98 KB

Contents

-# - blank_tmpl_id = WcoEmail::EmailTemplate.where({ slug: 'blank' }).first&.id

.email-contexts--form
  = form_for ctx, as: :context do |f|

    .flex-row
      = f.label :email_template_id
      = f.select :email_template_id, options_for_select(@email_templates_list, selected: params[:email_template_id] || ctx.email_template_id ), {}, { class: 'select2', required: true }
      - if ctx.email_template_id
        = link_to '[view]', email_template_path( ctx.email_template_id ), target: :_blank, class: [ 'action-view' ]
        = link_to '[~]', edit_email_template_path( ctx.email_template_id ), target: :_blank, class: [ 'action-view' ]
        <b>Layout:</b>
        = ctx.email_template.layout

    .flex-row
      %label From
      = f.select :from_email, options_for_select(WcoEmail::EmailTemplate.from_emails_list, selected: ctx.from_email), {}, { class: 'select2' }
      %label To lead
      = f.select :lead_id, options_for_select( @leads_list, selected: ctx.lead_id ), {}, { class: 'select2' }
      %label cc
      = f.text_field :cc, class: 'w-100'

    .flex-row
      = f.label :subject
      = f.text_field :subject, class: 'w-100'

    .flex-row
      = f.label :reply_to_message
      = f.select :reply_to_message_id, options_for_select([[ ctx.reply_to_message, ctx.reply_to_message_id ]], selected: ctx.reply_to_message_id), {}, class: 'w-100'


    .tab-labels.flex-row
      %a.label-raw{ href: "javascript: void(0)", data: { ref: '.tab-raw' } } Raw
      %a.label-preview.active{ href: "javascript: void(0)", data: { ref: '.tab-preview' } } Preview
      .label-save-preview= f.submit 'Save & Preview'
    .tabs
      .tab-raw
        = f.text_area :body, class: 'tinymce'
      .tab-preview
        - if ctx.new_record?
          New record...
        - else
          %iframe{ src: context_iframe_path(ctx), width: '100%', height: '100%' }


    .actions
      .left
        = f.submit 'Preview'
      .right
        = f.label :send_at
        = f.text_field :send_at
        = f.submit 'Schedule'

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
wco_email-0.1.1.40 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.39 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.38 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.37 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.36 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.35 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.34 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.33 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.32 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.31 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.30 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.29 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.28 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.27 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.26 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.25 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.24 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.23 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.22 app/views/wco_email/contexts/_form.haml
wco_email-0.1.1.21 app/views/wco_email/contexts/_form.haml