PageSourceSearch

https://pika.page/assets/controllers/admin_action_email_toggle_con…260deb14229ed8be570d4da3e69b51425a651e4a.js

js pika.page collected 2026-10-03 21:44:20 UTC 752 bytes, 24 lines download raw bytes

1import { Controller } from "@hotwired/stimulus"
2
3export default class extends Controller {
4  static targets = ["checkbox", "emailSection", "emailTextarea", "submitButton"]
5  static values = { actionableName: String }
6
7  connect() {
8    this.toggle()
9  }
10
11  toggle() {
12    const sendEmail = this.checkboxTarget.checked
13
14    if (sendEmail) {
15      this.emailSectionTarget.classList.remove("hidden")
16      this.emailTextareaTarget.disabled = false
17      this.submitButtonTarget.textContent = `Block this ${this.actionableNameValue} and Email`
18    } else {
19      this.emailSectionTarget.classList.add("hidden")
20      this.emailTextareaTarget.disabled = true
21      this.submitButtonTarget.textContent = `Block this ${this.actionableNameValue}`
22    }
23  }
24};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.