Skip to content

Commit

Permalink
2653 add event eoi (#2761)
Browse files Browse the repository at this point in the history
* πŸ’„ Fixed styling on ROI form

* πŸ“„ Updated interestForm to include a page URL field.

* πŸ§‘β€πŸ’» Made the Registration of interest button text modifiable

* πŸ› Fixed live editing for interest form button

* πŸ§ͺ Performing mimetype test for webp files

* βž– Removed unused "useTina" import

* Revert "πŸ§ͺ Performing mimetype test for webp files"

* πŸ”Added expression of interest jot form ID to global settings

* πŸ”§
- Updated interest form to use global setting for registration of interest jotform
- Fixed interest form using formId as page url

* 🚨 Fixed build errors

* βž– removed page url from tina schema (the jotform captures it now)

* πŸ’Ύ rebuilt project schema

---------

Co-authored-by: Calinator444 <[email protected]>
  • Loading branch information
Calinator444 and Calinator444 authored Jun 27, 2024
1 parent 4fb5d2b commit dc0d224
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 5 deletions.
5 changes: 5 additions & 0 deletions components/blocks-renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ const EventBooking = dynamic(() =>
import("./training/eventBooking").then((mod) => mod.EventBooking)
);

const InterestForm = dynamic(() =>
import("./events/interestForm").then((mod) => mod.InterestForm)
);

const LocationBlock = dynamic(() =>
import("./training/locationBlock").then((mod) => mod.LocationBlock)
);
Expand Down Expand Up @@ -90,6 +94,7 @@ const componentMap = {
BookingButton,
PaymentBlock,
ClientList,
InterestForm,
LatestTech,
VideoEmbed,
JotFormEmbed,
Expand Down
6 changes: 3 additions & 3 deletions components/blocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { bookingButtonSchema } from "../bookingButton/bookingButton";
import { utilityButtonSchema } from "../button/utilityButton";
import { clientListSchema } from "../company/clientList";
import { tweetEmbedSchema } from "../embeds/tweetEmbed";
import { interestFormSchema } from "../events/interestForm";
import { agreementFormBlockSchema } from "../terms-and-conditions/agreementForm";
import { eventBookingSchema } from "../training/eventBooking";
import { locationBlockSchema } from "../training/locationBlock";
Expand Down Expand Up @@ -37,7 +38,6 @@ import { googleMapsSchema } from "./googleMapsWrapper";
import { gridLayoutSchema } from "./gridLayout";
import { heroBlockSchema } from "./hero";
import { horizontalBlockSchema } from "./horizontalCard";
import { inlineJotFormSchema } from "../inlineJotForm/inlineJotForm";
import { internalCarouselBlockSchema } from "./internalCarousel";
import { jotFormEmbedSchema } from "./jotFormEmbed";
import { newslettersTableBlockSchema } from "./newslettersTable";
Expand All @@ -56,6 +56,7 @@ export const pageBlocks: Template[] = [
aboutUsBlockSchema,
agendaSchema,
agreementFormBlockSchema,
interestFormSchema,
bookingButtonSchema,
builtOnAzureBlockSchema,
carouselBlockSchema,
Expand All @@ -80,7 +81,6 @@ export const pageBlocks: Template[] = [
gridLayoutSchema,
heroBlockSchema,
horizontalBlockSchema,
inlineJotFormSchema,
internalCarouselBlockSchema,
joinAsPresenterSchema,
joinGithubSchema,
Expand Down Expand Up @@ -109,6 +109,7 @@ export const pageBlocks: Template[] = [
export * from "../bookingButton/bookingButton";
export * from "../button/utilityButton";
export * from "../embeds/tweetEmbed";
export * from "../inlineJotForm/inlineJotForm";
export * from "../terms-and-conditions/agreementForm";
export * from "../training/eventBooking";
export * from "../training/presenterBlock";
Expand Down Expand Up @@ -136,7 +137,6 @@ export * from "./fixedColumns";
export * from "./flag";
export * from "./googleMapsWrapper";
export * from "./hero";
export * from "../inlineJotForm/inlineJotForm";
export * from "./jotFormEmbed";
export * from "./newslettersTable";
export * from "./recurringEvent";
Expand Down
26 changes: 26 additions & 0 deletions components/events/interestForm.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Template } from "tinacms";
import globals from "../../content/global/index.json";
import { JotFormEmbed } from "../blocks";

export const InterestForm = (props) => {
return (
<JotFormEmbed
jotFormId={`${globals.registrationOfInterestJotFormId}`}
buttonText={props.buttonText || "I am interested"}
containerClass=""
/>
);
};

export const interestFormSchema: Template = {
label: "Interest Form",
name: "InterestForm",
fields: [
{
type: "string",
label: "Button Text",
name: "buttonText",
required: false,
},
],
};
3 changes: 2 additions & 1 deletion content/global/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,6 @@
]
},
"bookingJotFormId": "233468468973070",
"newsletterJotFormId": "240991361342051"
"newsletterJotFormId": "240991361342051",
"registrationOfInterestJotFormId": "241638083078865"
}
5 changes: 5 additions & 0 deletions tina/collections/global.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -334,5 +334,10 @@ export const globalSchema: Collection = {
name: "newsletterJotFormId",
label: "Newsletter JotForm Id",
},
{
type: "string",
name: "registrationOfInterestJotFormId",
label: "Registration of Interest JotForm Id",
},
],
};
2 changes: 1 addition & 1 deletion tina/tina-lock.json

Large diffs are not rendered by default.

0 comments on commit dc0d224

Please sign in to comment.