Sha256: 259cd5c971903d42118abf3c345e28e4455094a49902b967376bf63bf5ac64d8

Contents?: true

Size: 1.59 KB

Versions: 11

Compression:

Stored size: 1.59 KB

Contents

.email-contexts--form
  %h2
    New Email Context
    - if email_ctx.email_template
      with template `#{email_ctx.email_template.slug}` type:#{email_ctx.email_template.type}.

  - url = %w| index new create |.include?( params[:action] ) ? email_contexts_path : email_context_path(email_ctx)
  = form_for email_ctx, url: url do |f|
    .row

      .col.s6
        .field
          = f.label :email_template_id
          = f.select :email_template_id, options_for_select(@email_templates_list, selected: params[:email_template_id] || email_ctx.email_template&.id )
        .field
          = f.label :title
          = f.text_field :title

        .field
          = f.label :from_email
          = f.select :from_email, options_for_select(Ish::EmailContext.from_email_list, selected: email_ctx.from_email)

      .col.s6
        .field
          = f.label :type
          = f.select :type, options_for_select(Ish::EmailContext.types_list, selected: email_ctx.type)
        .TYPE_SINGLE
          .field
            = f.label :to_email
            = f.text_field :to_email
          %h5 Templating
          %div Commonly: name, companyName
          .field
            = f.text_area :tmpl, value: JSON.pretty_generate( email_ctx.tmpl )

    .field.field-subject
      = f.label :subject
      = f.text_field :subject
    - if 'plain' == email_ctx.email_template&.type
      .body
        = raw email_ctx.email_template.body
    - else
      .field
        = f.label :body
        = f.text_area :body, class: 'tinymce'
    .actions
      .left
        = f.submit 'Preview'
      .right
        -# = f.submit 'Schedule/Send'

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ish_manager-0.1.8.346 app/views/ish_manager/email_contexts/_form.haml
ish_manager-0.1.8.345 app/views/ish_manager/email_contexts/_form.haml
ish_manager-0.1.8.344 app/views/ish_manager/email_contexts/_form.haml
ish_manager-0.1.8.343 app/views/ish_manager/email_contexts/_form.haml
ish_manager-0.1.8.342 app/views/ish_manager/email_contexts/_form.haml
ish_manager-0.1.8.341 app/views/ish_manager/email_contexts/_form.haml
ish_manager-0.1.8.340 app/views/ish_manager/email_contexts/_form.haml
ish_manager-0.1.8.339 app/views/ish_manager/email_contexts/_form.haml
ish_manager-0.1.8.338 app/views/ish_manager/email_contexts/_form.haml
ish_manager-0.1.8.337 app/views/ish_manager/email_contexts/_form.haml
ish_manager-0.1.8.336 app/views/ish_manager/email_contexts/_form.haml