// Legacy Gift Commitment Form - React Component (function() { 'use strict'; if (typeof React === 'undefined' || typeof ReactDOM === 'undefined') { console.error('React or ReactDOM not loaded!'); return; } const { useState, useEffect } = React; function LegacyGiftForm() { // State for dynamic names const [names, setNames] = useState(['']); // Update hidden realname field whenever names change useEffect(() => { const realnameField = document.querySelector('input[name="realname"]'); if (realnameField) { const formattedNames = names .filter(name => name.trim() !== '') .map((name, index) => `${index + 1}. ${name}`) .join(', '); realnameField.value = formattedNames; } }, [names]); // State for gift type sections const [giftTypes, setGiftTypes] = useState({ intendedBequest: false, charitableTrust: false, iraRetirement: false, lifeInsurance: false }); // State for anonymous checkbox const [isAnonymous, setIsAnonymous] = useState(false); // Name field handlers const addName = () => { if (names.length < 5) { setNames([...names, '']); } }; const removeName = (index) => { if (names.length > 1) { setNames(names.filter((_, i) => i !== index)); } }; const updateName = (index, value) => { const updated = [...names]; updated[index] = value; setNames(updated); }; // Gift type toggle handler const toggleGiftType = (type) => { setGiftTypes({ ...giftTypes, [type]: !giftTypes[type] }); }; return (
{/* Introduction Text */}

I/we have included the University of West Georgia in my/our estate plans by naming the University of West Georgia Foundation ("UWGF") as beneficiary of my/our assets.

{/* Names on Estate Document - Dynamic Fields */}
Name(s) on Estate Document *
{names.map((name, index) => (
updateName(index, e.target.value)} placeholder="Enter full name" required={index === 0} aria-required={index === 0 ? "true" : "false"} />
{names.length > 1 && ( )}
))} {names.length < 5 && ( )}

{/* Gift Arrangement Section */}
My/our gift arrangement is described as follows *:

Please select at least one gift type and provide details.

{/* Intended Bequest */}
toggleGiftType('intendedBequest')} aria-controls="intended-bequest-details" aria-expanded={giftTypes.intendedBequest} />
{giftTypes.intendedBequest && (

UWGF is named as the beneficiary of a bequest in my/our will described as:

)}
{/* Charitable Trust */}
toggleGiftType('charitableTrust')} aria-controls="charitable-trust-details" aria-expanded={giftTypes.charitableTrust} />
{giftTypes.charitableTrust && (
)}
{/* IRA/Retirement Plan */}
toggleGiftType('iraRetirement')} aria-controls="ira-retirement-details" aria-expanded={giftTypes.iraRetirement} />
{giftTypes.iraRetirement && (

UWGF is named as a beneficiary of my IRA/Retirement Plan

Helpful tip: Please share the company name and gift details. For your security, there's no need to include account numbers at this time.
)}
{/* Life Insurance Policy */}
toggleGiftType('lifeInsurance')} aria-controls="life-insurance-details" aria-expanded={giftTypes.lifeInsurance} />
{giftTypes.lifeInsurance && (

UWGF is named as the beneficiary of a life insurance policy

Helpful tip: Please share the company name and policy amount. For your security, there's no need to include policy numbers at this time.
)}

{/* Purpose of Gift */}
*Gifts of $25,000 and more may be restricted for a specific purpose. Gifts of $25,000 and more may be used to create an Endowed Fund. A separate Endowment Agreement will be drafted and entered into with the University of West Georgia Foundation to govern the Fund use in perpetuity.

{/* Anonymous Option */}
setIsAnonymous(e.target.checked)} />

{/* Signature and Date Section */}
Signature(s) and Contact Information

{/* Submission Notice */}

Note: This form and any additional documentation of your plans should be mailed or emailed to the University of West Georgia Foundation, 1601 Maple St., Carrollton, GA 30118 or sent to development@westga.edu.

{/* Security Notice */}

Please note: This form is submitted securely via HTTPS, but email is not an encrypted medium. For your protection, please do not include sensitive financial details such as social security numbers, account numbers, or policy numbers. We'll work with you directly to gather those details through secure channels when needed.

); } // Wait for DOM to be ready function initForm() { const rootElement = document.getElementById('legacy-gift-form-root'); if (rootElement) { const root = ReactDOM.createRoot(rootElement); root.render(); } else { console.error('Root element #legacy-gift-form-root not found!'); } } // Check if DOM is already loaded if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', initForm); } else { initForm(); } })();