<commit_before>.single-panel--wrapper.single-panel--wrapper--large.single-panel--wrapper--short.mb-4
  .single-panel--padded-content--short-padding
    h5= t ".header"
    = form_for(current_publisher, url: publisher_path(current_publisher.id), method: :patch) do |f|
      .d-flex
        .mr-auto.p-2
          p= t ".extended_login.intro"
        .p-2
          label.switch
            = f.check_box 'thirty_day_login', checked: current_publisher.thirty_day_login?, class: "form-check-input", onchange: "this.form.submit()"
            span.slider.round

.single-panel--wrapper.single-panel--wrapper--large.single-panel--wrapper--short.mb-4
  .single-panel--padded-content--short-padding#publishers_contact

    #contact_section(data-props=<EMAIL>(only: [:name, :email, :pending_email]))

    #show_contact

.single-panel--wrapper.single-panel--wrapper--large.single-panel--wrapper--short.mb-4
  .single-panel--padded-content--short-padding#publishers_contact
    h5 Email Settings
    = form_for(@publisher, url: publishers_path, html: { id: "update_publisher_marketing_email_form", class: 'mt-4 ml-4'}) do |f|
      = f.check_box(:subscribed_to_marketing_emails, class: "form-check-input")
      = f.label(:marketing_emails, class: "form-check-label", for: "publisher_subscribed_to_marketing_emails")

    - unless @publisher.paypal_locale?(params[:locale])
      hr
      = form_with(model: @publisher.uphold_connection, html: { id: "update_send_email_form", class: 'mt-4' }) do |f|
        label.d-block= t('.email.snooze')
        - if @publisher.uphold_connection.send_emails == UpholdConnection::FOREVER_DATE
          - selected = :forever
        - elsif @publisher.uphold_connection.send_emails > DateTime.now
          - selected = :next_year

        = select_tag :send_emails, options_for_select([[t('.email.options.until_next_year'), :next_year],[t('.email.options.forever'), :forever]], selected), include_blank: true
        - if @publisher.uphold_connection.send_emails > DateTime.now && @publisher.uphold_connection.send_emails != UpholdConnection::FOREVER_DATE
          #snoozeDetails.mt-2.font-italic.text-muted
            =t('.email.snoozed_until', date: @publisher.uphold_connection.send_emails.strftime("%Y-%m-%d"))

.single-panel--wrapper.single-panel--wrapper--large.single-panel--wrapper--short
  .single-panel--padded-content--short-padding
    .row
      .col-left-aligned--content
        h5= t ".delete_account.heading"
        p= t ".delete_account.intro"
    .row
      .col-small-centered
          p= link_to \
              t(".delete_account.button"),
              publisher_path(current_publisher.id),
              method: :delete,
              class: "btn btn-block btn-danger",
              data: { "js-confirm-with-modal": "delete-account-prompt" }
          script#delete-account-prompt type="text/html"
            h4= t ".delete_account.prompt.header"
            p= t ".delete_account.prompt.final_confirmation"
            .modal-buttons
              = link_to t(".delete_account.prompt.deny"), "#", class: "js-deny btn btn-wide btn-outline-secondary"
              = link_to t(".delete_account.prompt.confirm"), "#", class: "js-confirm btn btn-wide btn-danger"


= javascript_pack_tag 'SettingsPage'<commit_msg>Don't call send_emails on nil class (#2806)<commit_after>.single-panel--wrapper.single-panel--wrapper--large.single-panel--wrapper--short.mb-4
  .single-panel--padded-content--short-padding
    h5= t ".header"
    = form_for(current_publisher, url: publisher_path(current_publisher.id), method: :patch) do |f|
      .d-flex
        .mr-auto.p-2
          p= t ".extended_login.intro"
        .p-2
          label.switch
            = f.check_box 'thirty_day_login', checked: current_publisher.thirty_day_login?, class: "form-check-input", onchange: "this.form.submit()"
            span.slider.round

.single-panel--wrapper.single-panel--wrapper--large.single-panel--wrapper--short.mb-4
  .single-panel--padded-content--short-padding#publishers_contact

    #contact_section(data-<EMAIL>=<EMAIL>(only: [:name, :email, :pending_email]))

    #show_contact

.single-panel--wrapper.single-panel--wrapper--large.single-panel--wrapper--short.mb-4
  .single-panel--padded-content--short-padding#publishers_contact
    h5 Email Settings
    = form_for(@publisher, url: publishers_path, html: { id: "update_publisher_marketing_email_form", class: 'mt-4 ml-4'}) do |f|
      = f.check_box(:subscribed_to_marketing_emails, class: "form-check-input")
      = f.label(:marketing_emails, class: "form-check-label", for: "publisher_subscribed_to_marketing_emails")

    - unless @publisher.paypal_locale?(params[:locale])
      hr
      = form_with(model: @publisher.uphold_connection, html: { id: "update_send_email_form", class: 'mt-4' }) do |f|
        label.d-block= t('.email.snooze')
        - if @publisher.uphold_connection&.send_emails == UpholdConnection::FOREVER_DATE
          - selected = :forever
        - elsif @publisher.uphold_connection&.send_emails > DateTime.now
          - selected = :next_year

        = select_tag :send_emails, options_for_select([[t('.email.options.until_next_year'), :next_year],[t('.email.options.forever'), :forever]], selected), include_blank: true
        - if @publisher.uphold_connection&.send_emails > DateTime.now && @publisher.uphold_connection&.send_emails != UpholdConnection::FOREVER_DATE
          #snoozeDetails.mt-2.font-italic.text-muted
            =t('.email.snoozed_until', date: @publisher.uphold_connection&.send_emails&.strftime("%Y-%m-%d"))

.single-panel--wrapper.single-panel--wrapper--large.single-panel--wrapper--short
  .single-panel--padded-content--short-padding
    .row
      .col-left-aligned--content
        h5= t ".delete_account.heading"
        p= t ".delete_account.intro"
    .row
      .col-small-centered
          p= link_to \
              t(".delete_account.button"),
              publisher_path(current_publisher.id),
              method: :delete,
              class: "btn btn-block btn-danger",
              data: { "js-confirm-with-modal": "delete-account-prompt" }
          script#delete-account-prompt type="text/html"
            h4= t ".delete_account.prompt.header"
            p= t ".delete_account.prompt.final_confirmation"
            .modal-buttons
              = link_to t(".delete_account.prompt.deny"), "#", class: "js-deny btn btn-wide btn-outline-secondary"
              = link_to t(".delete_account.prompt.confirm"), "#", class: "js-confirm btn btn-wide btn-danger"


= javascript_pack_tag 'SettingsPage'
{'fraction_non_alphanumeric': 0.14785518710069973, 'fraction_numerical': 0.004563431700638881, 'mean_word_length': 3.041180086047941, 'pattern_counts': {'":': 2, '<': 6, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3823795', 'n_tokens_mistral': 2164, 'n_tokens_neox': 2118, 'n_words': 305}