bugfix - resolved modal form ui issue
This commit is contained in:
parent
2e621d0d6c
commit
0cd8f39a40
|
@ -44,7 +44,8 @@ const FormLeftDescriptionRightContactUs = () => {
|
||||||
<h2 className="mb-8 text-xl font-semibold text-base-content ">
|
<h2 className="mb-8 text-xl font-semibold text-base-content ">
|
||||||
Fill in the form
|
Fill in the form
|
||||||
</h2>
|
</h2>
|
||||||
{!localStorage.getItem("contactus") ? (
|
{typeof window !== "undefined" &&
|
||||||
|
!localStorage.getItem("contactus") ? (
|
||||||
<form onSubmit={handleSubmit(onSubmit)}>
|
<form onSubmit={handleSubmit(onSubmit)}>
|
||||||
<div className="grid gap-4 gap-y-0">
|
<div className="grid gap-4 gap-y-0">
|
||||||
{/* Grid */}
|
{/* Grid */}
|
||||||
|
|
|
@ -38,7 +38,7 @@ function ModalSignUp() {
|
||||||
<div className="flex justify-end pb-2 select-none">
|
<div className="flex justify-end pb-2 select-none">
|
||||||
<label
|
<label
|
||||||
htmlFor="sign-up-modal"
|
htmlFor="sign-up-modal"
|
||||||
className="cursor-pointer"
|
className="cursor-pointer text-base-content"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
reset();
|
reset();
|
||||||
}}
|
}}
|
||||||
|
@ -46,8 +46,9 @@ function ModalSignUp() {
|
||||||
<Icon name="Dismiss20Filled" size="medium" />
|
<Icon name="Dismiss20Filled" size="medium" />
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex flex-grow flex-col h-[30rem] lg:h-full overflow-y-scroll">
|
||||||
<div
|
<div
|
||||||
className="w-[100%] bg-gradient-to-r from-primary to-secondary px-6 pt-2 mt-3 pb-6 rounded-lg"
|
className="w-[100%] bg-gradient-to-r from-primary to-secondary px-6 mt-3 pb-6 rounded-lg"
|
||||||
data-aos="fade-up"
|
data-aos="fade-up"
|
||||||
>
|
>
|
||||||
<h3 className="pb-1 text-3xl font-bold md:text-3xl pt-6">
|
<h3 className="pb-1 text-3xl font-bold md:text-3xl pt-6">
|
||||||
|
@ -66,27 +67,29 @@ function ModalSignUp() {
|
||||||
>
|
>
|
||||||
<div className="relative mt-6">
|
<div className="relative mt-6">
|
||||||
<input
|
<input
|
||||||
{...register("email")}
|
|
||||||
type="text"
|
type="text"
|
||||||
id="SignUpEmail"
|
id="SignUpEmail"
|
||||||
className="py-3 px-4 block w-full bg-base-200 text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
className="py-3 px-4 block w-full bg-base-200 text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
||||||
placeholder="Email…"
|
placeholder="Email…"
|
||||||
aria-label="Email…"
|
aria-label="Email…"
|
||||||
autoComplete="on"
|
autoComplete="on"
|
||||||
|
{...register("email")}
|
||||||
/>
|
/>
|
||||||
<div className="text-start text-sm italic text-error-content">
|
<div className="text-start text-sm italic text-error-content">
|
||||||
{errors.email?.message}
|
{errors.email?.message}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="flex flex-row gap-4">
|
||||||
<div className="relative mt-1">
|
<div className="relative mt-1">
|
||||||
<input
|
<input
|
||||||
{...register("firstName")}
|
|
||||||
id="SignUpFirstName"
|
id="SignUpFirstName"
|
||||||
type="text"
|
type="text"
|
||||||
className="py-3 px-4 block w-full bg-base-200 text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
className="py-3 px-4 block w-full bg-base-200 text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
||||||
placeholder="First Name…"
|
placeholder="First Name…"
|
||||||
aria-label="First Name…"
|
aria-label="First Name…"
|
||||||
autoComplete="on"
|
autoComplete="on"
|
||||||
|
{...register("firstName")}
|
||||||
/>
|
/>
|
||||||
<div className="text-start text-sm italic text-error-content">
|
<div className="text-start text-sm italic text-error-content">
|
||||||
{errors.firstName?.message}
|
{errors.firstName?.message}
|
||||||
|
@ -94,39 +97,41 @@ function ModalSignUp() {
|
||||||
</div>
|
</div>
|
||||||
<div className="relative mt-1">
|
<div className="relative mt-1">
|
||||||
<input
|
<input
|
||||||
{...register("lastName")}
|
|
||||||
id="SignUpLastName"
|
id="SignUpLastName"
|
||||||
type="text"
|
type="text"
|
||||||
className="py-3 px-4 block w-full bg-base-200 text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
className="py-3 px-4 block w-full bg-base-200 text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
||||||
placeholder="Last Name…"
|
placeholder="Last Name…"
|
||||||
aria-label="Last Name…"
|
aria-label="Last Name…"
|
||||||
|
{...register("lastName")}
|
||||||
/>
|
/>
|
||||||
<div className="text-start text-sm italic text-error-content">
|
<div className="text-start text-sm italic text-error-content">
|
||||||
{errors.lastName?.message}
|
{errors.lastName?.message}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="relative mt-1">
|
<div className="relative mt-1">
|
||||||
<input
|
<input
|
||||||
{...register("phoneNumber")}
|
|
||||||
id="SignUpPhoneNumber"
|
id="SignUpPhoneNumber"
|
||||||
type="text"
|
type="text"
|
||||||
className="py-3 px-4 block w-full bg-base-200 text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
className="py-3 px-4 block w-full bg-base-200 text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
||||||
placeholder="Phone Number…"
|
placeholder="Phone Number…"
|
||||||
aria-label="Phone Number…"
|
aria-label="Phone Number…"
|
||||||
|
{...register("phoneNumber")}
|
||||||
/>
|
/>
|
||||||
<div className="text-start text-sm italic text-error-content">
|
<div className="text-start text-sm italic text-error-content">
|
||||||
{errors.phoneNumber?.message}
|
{errors.phoneNumber?.message}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex flex-row gap-4">
|
||||||
<div className="relative mt-1">
|
<div className="relative mt-1">
|
||||||
<input
|
<input
|
||||||
{...register("organisation")}
|
|
||||||
id="SignUpOrganisation"
|
id="SignUpOrganisation"
|
||||||
type="text"
|
type="text"
|
||||||
className="py-3 px-4 block w-full bg-base-200 text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
className="py-3 px-4 block w-full bg-base-200 text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
||||||
placeholder="Organisation…"
|
placeholder="Organisation…"
|
||||||
aria-label="Organisation…"
|
aria-label="Organisation…"
|
||||||
|
{...register("organisation")}
|
||||||
/>
|
/>
|
||||||
<div className="text-start text-sm italic text-error-content">
|
<div className="text-start text-sm italic text-error-content">
|
||||||
{errors.organisation?.message}
|
{errors.organisation?.message}
|
||||||
|
@ -134,10 +139,10 @@ function ModalSignUp() {
|
||||||
</div>
|
</div>
|
||||||
<div className="relative mt-1">
|
<div className="relative mt-1">
|
||||||
<select
|
<select
|
||||||
{...register("organisationSize")}
|
|
||||||
id="SignUpCompanySize"
|
id="SignUpCompanySize"
|
||||||
defaultValue={""}
|
defaultValue={""}
|
||||||
className="py-3 px-4 block w-full bg-base-200 text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
className="py-3 px-4 block w-full bg-base-200 text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
||||||
|
{...register("organisationSize")}
|
||||||
>
|
>
|
||||||
<option className="bg-gray-850" value={""} disabled>
|
<option className="bg-gray-850" value={""} disabled>
|
||||||
Company Size…
|
Company Size…
|
||||||
|
@ -158,14 +163,16 @@ function ModalSignUp() {
|
||||||
{errors.organisationSize?.message}
|
{errors.organisationSize?.message}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-row gap-4">
|
||||||
<div className="relative mt-1">
|
<div className="relative mt-1">
|
||||||
<input
|
<input
|
||||||
{...register("password")}
|
|
||||||
id="SignUpPwd"
|
id="SignUpPwd"
|
||||||
type="password"
|
type="password"
|
||||||
className="py-3 px-4 block w-full bg-base-200 text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
className="py-3 px-4 block w-full bg-base-200 text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
||||||
placeholder="Password..."
|
placeholder="Password..."
|
||||||
aria-label="Password"
|
aria-label="Password"
|
||||||
|
{...register("password")}
|
||||||
/>
|
/>
|
||||||
<div className="text-start text-sm italic text-error-content">
|
<div className="text-start text-sm italic text-error-content">
|
||||||
{errors.password?.message}
|
{errors.password?.message}
|
||||||
|
@ -173,22 +180,24 @@ function ModalSignUp() {
|
||||||
</div>
|
</div>
|
||||||
<div className="relative mt-1 mb-2">
|
<div className="relative mt-1 mb-2">
|
||||||
<input
|
<input
|
||||||
{...register("passwordConfirmation")}
|
|
||||||
id="SignUpPwdConfirm"
|
id="SignUpPwdConfirm"
|
||||||
type="password"
|
type="password"
|
||||||
className="py-3 px-4 block w-full bg-base-200 text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
className="py-3 px-4 block w-full bg-base-200 text-base-content border-white rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none "
|
||||||
placeholder="Confirmed Password..."
|
placeholder="Confirm Password..."
|
||||||
aria-label="Confirmed Password"
|
aria-label="Confirmed Password"
|
||||||
|
{...register("passwordConfirmation")}
|
||||||
/>
|
/>
|
||||||
<div className="text-start text-sm italic text-error-content">
|
<div className="text-start text-sm italic text-error-content">
|
||||||
{errors.passwordConfirmation?.message}
|
{errors.passwordConfirmation?.message}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<button type="submit" className="btn btn-primary">
|
<button type="submit" className="btn btn-primary">
|
||||||
Sign Up
|
Sign Up
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
</label>
|
</label>
|
||||||
</label>
|
</label>
|
||||||
</>
|
</>
|
||||||
|
|
Loading…
Reference in New Issue