PageSourceSearch

https://lolitamoda.com/assets/store/controllers/newsletter_controller

js lolitamoda.com collected 2026-10-07 07:30:06 UTC 898 bytes, 37 lines download raw bytes

1import { Controller } from "@hotwired/stimulus";
2
3export default class extends Controller {
4  static targets = [
5    "subscribeButton",
6    "confirmationMessage",
7    "finalizeButton",
8    "warning",
9    "acceptance",
10    "politics"
11  ];
12
13  connect() {
14    // console.log("Newsletter controller connected");
15    this.updateButtonState();
16  }
17
18  // Maneja el envío del formulario
19  submit(event) {
20    this.finalizeButtonTarget.classList.add("d-none");
21    this.confirmationMessageTarget.classList.remove("d-none");
22  }
23
24  // Maneja el cambio de los checkboxes
25  toggle() {
26    this.updateButtonState();
27  }
28
29  // Actualiza el estado del botón de finalizar
30  updateButtonState() {
31    const isAccepted =
32      this.acceptanceTarget.checked && this.politicsTarget.checked;
33
34    this.finalizeButtonTarget.disabled = !isAccepted;
35    this.warningTarget.classList.toggle("d-none", isAccepted);
36  }
37};

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.