forge/arma/ui/apps/main/components/createOrgForm.js
2026-03-07 13:20:43 -06:00

169 lines
6.0 KiB
JavaScript

(function () {
const RegistryApp = (window.RegistryApp = window.RegistryApp || {});
const { h } = RegistryApp.runtime;
const store = RegistryApp.store;
RegistryApp.componentFns = RegistryApp.componentFns || {};
RegistryApp.componentFns.CreateOrgForm = function CreateOrgForm() {
const handleCreate = () => {
const data = {
orgName: String(
document.getElementById("org-create-name")?.value || "",
),
type: String(
document.getElementById("org-create-type")?.value || "",
),
};
console.log("Org Registration:", data);
};
return h(
"div",
{ className: "split-container" },
h(
"div",
{ className: "info-panel" },
h("h2", null, "Registration Details"),
h(
"p",
null,
"Complete the form to add your organization to the Global Organization Registry.",
),
h(
"ul",
{
style: {
textAlign: "left",
marginTop: "1.5rem",
listStyleType: "none",
padding: 0,
},
},
h(
"li",
{ style: { marginBottom: "0.5rem" } },
"✅ Official Organization Designator",
),
h(
"li",
{ style: { marginBottom: "0.5rem" } },
"✅ Secure Comms Channel",
),
h(
"li",
{ style: { marginBottom: "0.5rem" } },
"✅ Deployment Roster Access",
),
h(
"li",
{ style: { marginBottom: "0.5rem" } },
"✅ After-Action Report Tools",
),
),
h(
"div",
{
className: "price-tag",
style: {
marginTop: "2rem",
padding: "1rem",
background: "var(--bg-app)",
borderRadius: "var(--radius)",
border: "1px solid var(--border)",
},
},
h(
"span",
{
style: {
display: "block",
fontSize: "0.9rem",
color: "var(--text-muted)",
},
},
"Registration Fee",
),
h(
"span",
{
style: {
display: "block",
fontSize: "2rem",
fontWeight: "700",
color: "var(--primary)",
},
},
"$50,000",
),
),
),
h(
"div",
{ className: "form-panel card", style: { margin: 0 } },
h("h2", null, "Organization Registration"),
h(
"div",
{ className: "app-form" },
h(
"div",
null,
h("label", null, "Organization Name"),
h("input", {
id: "org-create-name",
type: "text",
placeholder: "e.g. Task Force 141",
}),
),
h(
"div",
null,
h("label", null, "Organization Type"),
h(
"select",
{ id: "org-create-type" },
h(
"option",
{ value: "infantry" },
"Infantry / Milsim",
),
h("option", { value: "aviation" }, "Aviation Wing"),
h(
"option",
{ value: "pmc" },
"Private Military Company",
),
h(
"option",
{ value: "support" },
"Logistics & Support",
),
),
),
h(
"div",
{ className: "form-actions" },
h(
"button",
{
type: "button",
style: { width: "100%" },
onClick: handleCreate,
},
"Submit Registration",
),
h(
"span",
{
className: "cancel-link",
onClick: () => store.setView("home"),
},
"Cancel / Return to Main",
),
),
),
),
);
};
})();