Sha256: a94b3f01ba57c2c7246488a2cda655f484e11648d690a76dae0c9f0b7a489b88

Contents?: true

Size: 1.94 KB

Versions: 7

Compression:

Stored size: 1.94 KB

Contents

- url = email_template.new_record? ? email_templates_path : email_template_path(email_template.id)

.email-templates--form
  = form_for email_template, as: :template, url: url do |f|
    .field
      %label Slug
      = f.text_field :slug
    .flex-row
      %label Layout
      = f.select :layout, options_for_select(WcoEmail::EmailTemplate::LAYOUTS, selected: email_template.layout), {}, class: 'select2'
      %label From
      = f.select :from_email, options_for_select(WcoEmail::EmailTemplate.from_emails_list, selected: email_template.from_email), {}, class: 'select2'
    .field.field-subject
      = f.label :subject
      = f.text_field :subject
    .field
      = f.label :preview_str
      = f.text_field :preview_str
    .field
      %label mangle_subject
      = f.check_box :mangle_subject

    -# .field
    -#   = f.label :can_unsubscribe
    -#   = f.check_box :can_unsubscribe


    .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
        -## 2024-01-xx No class tinymce, cannot have tinymce mess with my own templating.
        -## 2024-02-05 re-addedd tinymce
        -##            ah! I meant, erb templates are ruined by summernote.
        = f.text_area :body

      .tab-preview
        - if email_template.persisted?
          %iframe{ src: email_template_iframe_path(email_template), width: '100%', height: '100%' }
    - if email_template.persisted?
      .gray.mini= link_to email_template_iframe_path(email_template), email_template_iframe_path(email_template), target: :_blank

    .row
      .col-md-6
        .field
          = f.label :config_json
          = f.text_area :config_json
      .col-md-6
        .field
          = f.label :config_exe
          = f.text_area :config_exe

    .actions
      = f.submit 'Save'

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wco_email-0.1.1.72 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.71 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.70 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.69 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.68 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.67 app/views/wco_email/email_templates/_form.haml
wco_email-0.1.1.66 app/views/wco_email/email_templates/_form.haml