PageSourceSearch

https://brookstoneng.org/build/assets/AdmissionForm-Bmxa_Bl1.js

js brookstoneng.org collected 2026-10-08 02:17:04 UTC 8,578 bytes, 1 lines download raw bytes

1import{u as g,r as i,b as N,j as e}from"./app-BH0zvs3H.js";import{I as l}from"./InputError-CeNm9l9w.js";import{T as n}from"./TextInput-CzxfL7cs.js";import{L as _,p as w,y as u}from"./index-Ynou36bb.js";import{F as C}from"./CheckCircleIcon-Cge_3Hil.js";function O({schema:F,content:k}){g().props.auth.institutions;const r=g().props.flash;i.useEffect(()=>{if(r?.application_code){const s=route("application.success",r.application_code);window.location.href=s}},[r]);const[p,h]=i.useState([]),[d,x]=i.useState(!1);i.useEffect(()=>{(async m=>{try{const c=await axios.get(`/api/classes/${m}`);h(c.data??[])}catch(c){console.error(c)}})("primary")},[]);const{data:a,setData:t,post:f,processing:b,errors:o,reset:j}=N({name:"",email:"",phone:"",address:"",gender:"",guardian_name:"",guardian_phone:"",guardian_email:"",institution_class_id:""}),y=s=>{if(s.preventDefault(),!d){u.error("You must give consent to proceed");return}f(route("application.create","primary"),{onSuccess:m=>{u.success("Check your e-mail address to proceed."),j(),x(!1)},onError:m=>{u.error("An error occurred while processing your application")}})},v=()=>{t("guardian_email",a.email),t("guardian_phone",a.phone)};return e.jsx(e.Fragment,{children:e.jsxs("section",{className:"bg-[#F9F9F9] pb-20",children:[e.jsx(_,{position:"bottom-right",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0,theme:"light",transition:w,style:{zIndex:99999}}),e.jsxs("div",{className:"container px-8 md:px-16 mx-auto p-20 bg-white rounded-2xl shadow-sm",children:[e.jsxs("form",{onSubmit:y,className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"name",className:"block font-bold text-sm/6 text-gray-900",children:"Applicant Name"}),e.jsxs("div",{className:"mt-2",children:[e.jsx(n,{id:"name",type:"name",name:"name",value:a.name,className:"block w-full border-[1px] !border-gray-300 rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-[#222222] focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6 shadow-md",autoComplete:"name",isFocused:!0,onChange:s=>t("name",s.target.value)}),e.jsx(l,{message:o.name,className:"mt-2"})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"email",className:"block font-bold text-sm/6 text-gray-900",children:"Applicant Email"}),e.jsxs("div",{className:"mt-2",children:[e.jsx(n,{id:"email",type:"email",name:"email",value:a.email,className:"block w-full border-[1px] !border-gray-300 rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-[#222222] focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6 shadow-md",autoComplete:"email",isFocused:!0,onChange:s=>t("email",s.target.value)}),e.jsx(l,{message:o.email,className:"mt-2"})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"phone",className:"block font-bold text-sm/6 text-gray-900",children:"Applicant Phone Number"}),e.jsxs("div",{className:"mt-2",children:[e.jsx(n,{id:"phone",type:"phone",name:"phone",value:a.phone,className:"block w-full border-[1px] !border-gray-300 rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-[#222222] focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6 shadow-md",autoComplete:"phone",isFocused:!0,onChange:s=>t("phone",s.target.value)}),e.jsx(l,{message:o.phone,className:"mt-2"})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"address",className:"block font-bold text-sm/6 text-gray-900",children:"Address"}),e.jsxs("div",{className:"mt-2",children:[e.jsx(n,{id:"address",type:"address",name:"address",value:a.address,className:"block w-full border-[1px] !border-gray-300 rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-[#222222] focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6 shadow-md",autoComplete:"address",isFocused:!0,onChange:s=>t("address",s.target.value)}),e.jsx(l,{message:o.address,className:"mt-2"})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"gender",className:"block text-sm/6 font-medium text-gray-900",children:"Gender"}),e.jsxs("select",{id:"gender",name:"gender",value:a.gender,className:"mt-2 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm",onChange:s=>t("gender",s.target.value),children:[e.jsx("option",{value:"",children:"Select gender"}),e.jsx("option",{value:"male",children:"Male"}),e.jsx("option",{value:"female",children:"Female"}),e.jsx("option",{value:"other",children:"Other"})]}),e.jsx(l,{message:o.gender,className:"mt-2"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"guardian_name",className:"block font-bold text-sm/6 text-gray-900",children:"Guardian Name"}),e.jsxs("div",{className:"mt-2",children:[e.jsx(n,{id:"guardian_name",type:"guardian_name",name:"guardian_name",value:a.guardian_name,className:"block w-full border-[1px] !border-gray-300 rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-[#222222] focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6 shadow-md",autoComplete:"guardian_name",isFocused:!0,onChange:s=>t("guardian_name",s.target.value)}),e.jsx(l,{message:o.guardian_name,className:"mt-2"})]})]}),e.jsx("div",{className:"md:col-span-3",children:e.jsxs("button",{type:"button",onClick:v,className:"flex items-center text-xs text-indigo-600 hover:scale-110 transition-all duration-300",children:["Use same as above"," ",e.jsx(C,{className:"h-4 w-4"})]})}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"guardian_email",className:"block font-bold text-sm/6 text-gray-900",children:"Guardian Email"}),e.jsxs("div",{className:"mt-2",children:[e.jsx(n,{id:"guardian_email",type:"guardian_email",name:"guardian_email",value:a.guardian_email,className:"block w-full border-[1px] !border-gray-300 rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-[#222222] focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6 shadow-md",autoComplete:"guardian_email",isFocused:!0,onChange:s=>t("guardian_email",s.target.value)}),e.jsx(l,{message:o.email,className:"mt-2"})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"guardian_phone",className:"block font-bold text-sm/6 text-gray-900",children:"Guardian Phone Number"}),e.jsxs("div",{className:"mt-2",children:[e.jsx(n,{id:"guardian_phone",type:"guardian_phone",name:"guardian_phone",value:a.guardian_phone,className:"block w-full border-[1px] !border-gray-300 rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-[#222222] focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6 shadow-md",autoComplete:"guardian_phone",isFocused:!0,onChange:s=>t("guardian_phone",s.target.value)}),e.jsx(l,{message:o.phone,className:"mt-2"})]})]}),e.jsx("div",{className:"",children:e.jsxs("div",{children:[e.jsx("label",{htmlFor:"institution_class_id",className:"block text-sm/6 font-medium text-gray-900",children:"Class"}),e.jsxs("select",{id:"institution_class_id",name:"institution_class_id",value:a.institution_class_id,className:"mt-2 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm",onChange:s=>{t("institution_class_id",s.target.value)},children:[e.jsx("option",{value:"",disabled:!0,children:"Select class"}),p.map(s=>e.jsx("option",{value:s.id,children:s.name},s.id))]}),e.jsx(l,{message:o.institution_class_id,className:"mt-2"})]})}),e.jsxs("div",{className:"md:col-span-3 gap-4 pt-4 flex",children:[e.jsx("input",{type:"checkbox",checked:d,onChange:()=>x(!d),className:"h-5 w-5"}),e.jsx("p",{className:"text-sm",children:"I consent to emails and calls regarding my inquiry and agree to the Privacy Policy."})]}),e.jsx("div",{className:"md:col-span-3 mx-auto pt-4",children:e.jsx("button",{type:"submit",disabled:b,className:"bg-[#EAB803] px-8 py-3 rounded-full hover:bg-[#
1EAB803] transition",children:"Apply Now"})})]}),e.jsxs("p",{className:"mt-10 text-right text-sm/6  text-[#6B7280]",children:["Already started an application?",e.jsx("a",{href:"/application/login",className:"font-semibold text-indigo-600 hover:text-indigo-500",children:"Resume application"})]})]})]})})}export{O as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.