From 520ab42c65b65696e1e8117683d2b2a7bf68f558 Mon Sep 17 00:00:00 2001 From: jinhojang6 Date: Fri, 8 Mar 2024 02:54:37 +0900 Subject: [PATCH] feat: add x handle and reason to the form --- src/App.svelte | 5 +++++ src/app.css | 4 +++- src/utils/commands.ts | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 33926c1..1c4671e 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -22,6 +22,9 @@ const name = form.querySelector("#form-name").value; const email = form.querySelector("#form-email").value; + const x = form.querySelector("#form-x"); + const reason = form.querySelector("#form-reason").value; + const res = await fetch( `https://odoo.logos.co/website_mass_mailing/subscribe2`, { @@ -35,6 +38,8 @@ params: { value: email, name: name || "", + x: x || "", + reason: reason || "", list_id: 12, subscription_type: "email", }, diff --git a/src/app.css b/src/app.css index 969f070..52a361d 100644 --- a/src/app.css +++ b/src/app.css @@ -66,9 +66,11 @@ main > div > div:first-child { .apply-form { display: flex; - align-items: center; + flex-direction: column; + justify-content: center; margin-top: 24px; gap: 12px; + width: 270px; } .apply-input { diff --git a/src/utils/commands.ts b/src/utils/commands.ts index 22d120b..929e041 100644 --- a/src/utils/commands.ts +++ b/src/utils/commands.ts @@ -13,7 +13,9 @@ export const commands: Record< const htmlString = ``;