/* global React */ const { useState, useRef } = React; /* ---------- Data ---------- */ const TIERS = [ { id: "title", name: "Title Sponsor", amount: "$5,000", badge: { kind: "flagship", label: "Flagship · 1 spot" }, summary: "Naming rights, a speaking slot & top billing across the entire campaign.", benefits: [ "Naming rights: “Moore Miles presented by [Your Business]”", "Speaking opportunity at the event", "Largest logo placement among all sponsors on event shirts", "Featured placement on Lewisburg-facing signage or car rider line banners", "Premium pop-up tent location at the event", "6 complimentary event shirts", "Dedicated sponsor recognition across campaign materials", "Dedicated customizeable social media and newsletter spotlight", "Logo on printed and digital materials, including flyers, banners, and emails", "Prominent logo on the physical campus sponsor banner", "Digital Title Sponsor badge", ], }, { id: "platinum", name: "Platinum", amount: "$2,000", badge: { kind: "limited", label: "Limited · 4 spots" }, summary: "Branded track sign, large shirt logo & year-round banner recognition.", benefits: [ "Branded track sign with QR code", "Large logo placement on event shirts", "Large logo on the physical campus sponsor banner", "4 complimentary event shirts", "Recognition on year-round school sponsor banners along the fence", "Featured sponsor signage opportunities", "Featured newsletter sponsor spotlight", "Social media and newsletter recognition", "Digital Platinum Sponsor badge", ], }, { id: "gold", name: "Gold", amount: "$1,000", badge: { kind: "limited", label: "Limited · 10 spots" }, summary: "Medium shirt logo, school “Thank You” banner & flyer placement.", benefits: [ "Medium logo placement on event shirts", "2 complimentary event shirts", "Logo on the physical campus sponsor banner", "Recognition on year-round school sponsor banners along the fence", "Logo included on social media post", "Recognition in event newsletter", "Logo featured on digital and print event flyer", "Digital Gold Sponsor badge", ], }, { id: "champion", name: "Community Champion", amount: "$600", badge: { kind: "open", label: "Open" }, summary: "School banner recognition, a group social post & newsletter mention.", benefits: [ "Small logo on the physical campus sponsor banner", "Logo included in group Instagram post", "Recognition in event newsletter", "Digital Community Champion badge", ], }, { id: "builder", name: "Community Builder", amount: "$300", badge: { kind: "open", label: "Open" }, summary: "Your name on the school “Thank You” banner & sponsor list.", benefits: [ "Business/personal name on the physical campus sponsor banner", "Recognition on year-round school sponsor banners along the fence", "Recognition in social media post", "Digital Community Builder badge", ], }, ]; const HEADLINE_EM = { "Sponsor our school year.": "school year", "Fuel a year at Moore.": "a year", "Partner with Moore Elementary.": "Moore Elementary", }; /* Paste your online donation page URL here when it's ready. Leave "" for now. */ const ONLINE_DONATION_URL = ""; const SPONSOR_SUBMIT_ENDPOINT = "/api/submit-sponsor.php"; const LOGO_UPLOAD_ENDPOINT = "/api/upload-logo.php"; async function uploadLogoToServer(file) { const formData = new FormData(); formData.append("logo", file); const response = await fetch(LOGO_UPLOAD_ENDPOINT, { method: "POST", body: formData, }); const result = await response.json(); if (!response.ok || !result.success) { throw new Error(result.error || "Logo upload failed."); } return result; } async function submitSponsorToNotion(payload) { const response = await fetch(SPONSOR_SUBMIT_ENDPOINT, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(payload), }); const result = await response.json(); if (!response.ok || !result.success) { throw new Error(result.error || "Sponsor submission failed."); } return result; } function Headline({ text }) { const em = HEADLINE_EM[text]; if (!em || !text.includes(em)) return <>{text}; const [before, after] = text.split(em); return <>{before}{em}{after}; } /* ---------- Sub-components ---------- */ function TierCard({ tier, selected, onSelect }) { const [open, setOpen] = useState(false); return (
{ if (e.key === "Enter" || e.key === " ") { e.preventDefault(); onSelect(); } }}>
{tier.name}
{tier.amount}
{tier.badge.label}

{tier.summary}

    {tier.benefits.map((b) =>
  • {b}
  • )}
); } function ReferralBand() { return (
Pass it on

Know a business that should sponsor?

You don't have to own a business to make a difference. Download our sponsorship deck and share it with a local business owner — a favorite restaurant, your family's dentist, the shop down the street. One quick introduction can help fund a whole year for Moore students.

Download sponsorship deck PDF · ready to text or email
); } function FormSection({ num, title, sub, required, children }) { return (
{num}
{title}{required && *} {sub && {sub}}
{children}
); } function LogoUpload({ file, onPick, onClear }) { const inputRef = useRef(null); const fmtSize = (b) => b < 1024 * 1024 ? (b / 1024).toFixed(0) + " KB" : (b / 1048576).toFixed(1) + " MB"; return ( <> { const f = e.target.files[0]; if (f) onPick(f); }} /> {file ? (
Logo preview
{file.name}
{fmtSize(file.size)}
) : (
inputRef.current && inputRef.current.click()}>
Upload your logo
Vector file or transparent PNG preferred · PNG, JPG, or SVG
)} ); } /* ---------- Main page ---------- */ function SponsorForm({ t }) { const [tier, setTier] = useState(""); const [business, setBusiness] = useState(""); const [website, setWebsite] = useState(""); const [noWebsite, setNoWebsite] = useState(false); const [social, setSocial] = useState(""); const [linkedin, setLinkedin] = useState(""); const [addressType, setAddressType] = useState(""); const [address, setAddress] = useState(""); const [contact, setContact] = useState(""); const [email, setEmail] = useState(""); const [phone, setPhone] = useState(""); const [hearAbout, setHearAbout] = useState(""); const [hearName, setHearName] = useState(""); const [hearTeacher, setHearTeacher] = useState(""); const [hearOther, setHearOther] = useState(""); const [donateMethod, setDonateMethod] = useState(""); const [logo, setLogo] = useState(null); const [message, setMessage] = useState(""); const [error, setError] = useState(""); const [confirmed, setConfirmed] = useState(false); const [submitting, setSubmitting] = useState(false); /* Inline styles so these new controls look right without extra CSS */ const selectStyle = { width: "100%", fontSize: ".95rem", padding: "14px 16px", border: "1px solid #dde3ef", borderRadius: "12px", background: "#fff", color: "#172033", outline: "none", appearance: "auto", }; const box = { width: "16px", height: "16px", margin: 0, flex: "0 0 auto", cursor: "pointer" }; // inline-block + width:auto neutralizes any inherited ".field label" block/uppercase rules const optLabel = { display: "inline-block", width: "auto", margin: 0, fontWeight: 500, textTransform: "none", letterSpacing: 0, fontSize: ".95rem", color: "#172033", cursor: "pointer", }; const inlineRow = { display: "flex", alignItems: "center", justifyContent: "flex-start", gap: "8px" }; const methodCard = (active) => ({ display: "flex", alignItems: "center", gap: "13px", width: "100%", boxSizing: "border-box", padding: "16px 18px", marginBottom: "12px", textAlign: "left", cursor: "pointer", border: "1.5px solid " + (active ? "#0c1546" : "#dde3ef"), borderRadius: "14px", background: active ? "#f6f8ff" : "#fff", }); const pickLogo = (f) => { if (logo && logo.url) URL.revokeObjectURL(logo.url); setLogo({ name: f.name, size: f.size, url: URL.createObjectURL(f), file: f }); }; const clearLogo = () => { if (logo && logo.url) URL.revokeObjectURL(logo.url); setLogo(null); }; const submit = async () => { setError(""); if (!tier) return setError("Please choose a sponsorship tier."); if (!business.trim()) return setError("Please enter your business or organization name."); if (!noWebsite && !website.trim()) return setError("Please enter your website, or check that you don't have one."); if (!addressType) return setError("Please select an address type — Residential or Business."); if (!address.trim()) return setError("Please enter your address."); if (!contact.trim()) return setError("Please enter a primary contact name."); if (!/\S+@\S+\.\S+/.test(email)) return setError("Please enter a valid email address."); if (!phone.trim()) return setError("Please enter a phone number."); if (!hearAbout) return setError("Please tell us how you heard about Moore Elementary."); if ((hearAbout === "Parent" || hearAbout === "Student") && !hearName.trim()) return setError("Please enter the " + hearAbout.toLowerCase() + "'s name."); if (hearAbout === "Other" && !hearOther.trim()) return setError("Please tell us how you heard about us."); if (!donateMethod) return setError("Please choose how you'd like to donate."); const selectedTierForSubmit = TIERS.find((x) => x.id === tier); const tierName = selectedTierForSubmit ? selectedTierForSubmit.name : tier; const tierAmount = selectedTierForSubmit ? selectedTierForSubmit.amount : ""; setSubmitting(true); try { let logoUrl = ""; if (logo && logo.file) { const uploadResult = await uploadLogoToServer(logo.file); logoUrl = uploadResult.url || ""; } const hearAboutDetails = [ hearAbout ? "How they heard about Moore Elementary: " + hearAbout : "", hearName ? hearAbout + " name: " + hearName.trim() : "", hearTeacher ? "Teacher: " + hearTeacher.trim() : "", hearOther ? "Other referral details: " + hearOther.trim() : "", ].filter(Boolean).join("\n"); const messageDetails = [ message.trim(), hearAboutDetails, "Donation method: " + (donateMethod === "check" ? "Check" : "Online donation"), noWebsite ? "Website: No website" : "", tierAmount ? "Sponsorship amount: " + tierAmount : "", ].filter(Boolean).join("\n\n"); await submitSponsorToNotion({ submittedAt: new Date().toISOString(), businessName: business.trim(), business: business.trim(), website: noWebsite ? "" : website.trim(), noWebsite: noWebsite, social: social.trim(), linkedin: linkedin.trim(), addressType: addressType, address: address.trim(), contactName: contact.trim(), contact: contact.trim(), email: email.trim(), phone: phone.trim(), sponsorshipTier: tierName, tier: tierName, tierAmount: tierAmount, logoUrl: logoUrl, message: messageDetails, }); setConfirmed(true); window.scrollTo({ top: 0, behavior: "smooth" }); } catch (err) { console.error("Sponsor submission error:", err); setError(err.message || "There was a problem submitting your sponsorship. Please try again."); window.scrollTo({ top: 0, behavior: "smooth" }); } finally { setSubmitting(false); } }; const reset = () => { setTier(""); setBusiness(""); setWebsite(""); setNoWebsite(false); setSocial(""); setLinkedin(""); setAddressType(""); setAddress(""); setContact(""); setEmail(""); setPhone(""); setHearAbout(""); setHearName(""); setHearTeacher(""); setHearOther(""); setDonateMethod(""); clearLogo(); setMessage(""); setError(""); setConfirmed(false); window.scrollTo({ top: 0, behavior: "smooth" }); }; const selectedTier = TIERS.find((x) => x.id === tier); const showNameTeacher = hearAbout === "Parent" || hearAbout === "Student"; return (
Moore Elementary PTO Back to Sponsor Page
{t.showHero && (
PTO Fundraiser · 2026–2027 School Year

Partner with the Moore Elementary PTO to fund a full year of classroom support, student experiences, and community events — culminating in Moore Miles, our signature Fun Run. Choose a tier below; every sponsorship reaches an entire school of families.

500+ students reached
Year-long recognition
Tax-deductible
)}
{confirmed ? ( ) : ( <>
{error &&
{error}
}

Every sponsorship supports the PTO's work throughout the 2026–2027 school year and is celebrated at Moore Miles, our culminating event. Higher tiers have limited availability.

{TIERS.map((tr) => ( setTier(tr.id)} /> ))}
setBusiness(e.target.value)} placeholder="e.g. Eagle Builders LLC" />
setWebsite(e.target.value)} placeholder="https://yourbusiness.com" style={noWebsite ? { background: "#f1f3f8", color: "#9aa3b2" } : undefined} />
{ setNoWebsite(e.target.checked); if (e.target.checked) setWebsite(""); }} />
setSocial(e.target.value)} placeholder="@yourbusiness" />
setLinkedin(e.target.value)} placeholder="linkedin.com/company/yourbusiness" />
setAddressType("Residential")} />
setAddressType("Business")} />
{addressType && (
setAddress(e.target.value)} placeholder="Street, City, State ZIP" />
)}
setContact(e.target.value)} placeholder="First Last" />
setEmail(e.target.value)} placeholder="you@business.com" />
setPhone(e.target.value)} placeholder="(615) 555-0000" />
{showNameTeacher && ( <>
setHearName(e.target.value)} placeholder="First Last" />
setHearTeacher(e.target.value)} placeholder="Teacher's name" />
)} {hearAbout === "Other" && (
)}

Sponsors at the Gold tier and above are featured by logo on Moore Miles t-shirts and the year-long thank-you banner. Send a vector file or transparent PNG so we can print it crisply.

Choose how you'd like to complete your tax-deductible contribution. We'll show the matching details on the confirmation page.

{donateMethod === "online" && ( )}

Submitting this form reserves your tier and lets the PTO follow up to confirm details. You'll complete your tax-deductible donation on the next step.

)}
); } function ConfirmScreen({ tier, method, onReset }) { return (
🎉
Thank you for sponsoring Moore Elementary!

We've received your sponsorship details and the PTO will reach out shortly to confirm everything and collect your logo. Your support powers a full year of programs for Moore families — and we can't wait to celebrate you at Moore Miles this spring.

{tier && (
{tier.name} · {tier.amount}
)}
{method === "check" ? ( <>
One last step

Drop your check at the school

Make your check payable to Moore Elementary School and drop it at the front office, or mail it to the address below. Your tax-deductible donation completes your sponsorship.

Moore Elementary School
1061 Lewisburg Pike
Franklin, TN 37064
) : ( <>
One last step

Complete your donation

Finish your sponsorship with your tax-deductible gift through our secure online donation page.

{ if (!ONLINE_DONATION_URL) e.preventDefault(); }}> Donate online {ONLINE_DONATION_URL ? "Opens our secure donation page" : "Secure donation page — link coming soon"}
)}
); } Object.assign(window, { SponsorForm });