mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: settings inputs
This commit is contained in:
parent
11f008dfe4
commit
0f4a154c8d
4 changed files with 115 additions and 25 deletions
|
|
@ -21,7 +21,7 @@ function SettingsProfilePasswordsPage() {
|
||||||
|
|
||||||
{auth.isAuthenticated && (
|
{auth.isAuthenticated && (
|
||||||
<div>
|
<div>
|
||||||
<h1>Account Password</h1>
|
<h1 className='text-3xl font-bold'>Account Password</h1>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
<Formik
|
<Formik
|
||||||
|
|
@ -35,13 +35,34 @@ function SettingsProfilePasswordsPage() {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isSubmitting }) => (
|
{({ isSubmitting }) => (
|
||||||
<Form>
|
<Form className="max-w-md">
|
||||||
Old Password <Field type="password" name="old_password" /><br />
|
<label className="block mb-2 font-bold" htmlFor="old_password">
|
||||||
New password <Field type="password" name="new_password" /><br />
|
Old Password
|
||||||
<button type="submit" disabled={isSubmitting}>
|
</label>
|
||||||
Submit
|
<Field
|
||||||
</button>
|
className="w-full px-4 py-2 mb-4 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||||
</Form>
|
type="password"
|
||||||
|
name="old_password"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<label className="block mb-2 font-bold" htmlFor="new_password">
|
||||||
|
New Password
|
||||||
|
</label>
|
||||||
|
<Field
|
||||||
|
className="w-full px-4 py-2 mb-4 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||||
|
type="password"
|
||||||
|
name="new_password"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
disabled={isSubmitting}
|
||||||
|
className="px-6 py-3 text-white bg-black rounded-lg shadow-md hover:bg-black focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||||
|
>
|
||||||
|
Submit
|
||||||
|
</button>
|
||||||
|
</Form>
|
||||||
|
|
||||||
)}
|
)}
|
||||||
</Formik>
|
</Formik>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ function SettingsProfilePage() {
|
||||||
|
|
||||||
{auth.isAuthenticated && (
|
{auth.isAuthenticated && (
|
||||||
<div>
|
<div>
|
||||||
<h1>Profile Settings</h1>
|
<h1 className='text-3xl font-bold'>Profile Settings</h1>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
<Formik
|
<Formik
|
||||||
|
|
@ -27,14 +27,44 @@ function SettingsProfilePage() {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isSubmitting }) => (
|
{({ isSubmitting }) => (
|
||||||
<Form>
|
<Form className="max-w-md">
|
||||||
Full name <Field type="textarea" name="full_name" /><br />
|
<label className="block mb-2 font-bold" htmlFor="full_name">
|
||||||
Email <Field type="email" name="email" /><br />
|
Full Name
|
||||||
Bio <Field as="textarea" type="textarea" name="bio" /><br />
|
</label>
|
||||||
<button type="submit" disabled={isSubmitting}>
|
<Field
|
||||||
|
className="w-full px-4 py-2 mb-4 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||||
|
type="textarea"
|
||||||
|
name="full_name"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<label className="block mb-2 font-bold" htmlFor="email">
|
||||||
|
Email
|
||||||
|
</label>
|
||||||
|
<Field
|
||||||
|
className="w-full px-4 py-2 mb-4 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||||
|
type="email"
|
||||||
|
name="email"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<label className="block mb-2 font-bold" htmlFor="bio">
|
||||||
|
Bio
|
||||||
|
</label>
|
||||||
|
<Field
|
||||||
|
as="textarea"
|
||||||
|
className="w-full px-4 py-2 mb-4 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||||
|
type="textarea"
|
||||||
|
name="bio"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
disabled={isSubmitting}
|
||||||
|
className="px-6 py-3 text-white bg-black rounded-lg shadow-md hover:bg-black focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||||
|
>
|
||||||
Submit
|
Submit
|
||||||
</button>
|
</button>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
)}
|
)}
|
||||||
</Formik>
|
</Formik>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ function SettingsOrganizationGeneral(params: any) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h1>Oganization Settings</h1>
|
<h1 className='text-3xl font-bold'>Oganization Settings</h1>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
{error && <p>Failed to load</p>}
|
{error && <p>Failed to load</p>}
|
||||||
{!org ? (
|
{!org ? (
|
||||||
|
|
@ -55,15 +55,53 @@ function SettingsOrganizationGeneral(params: any) {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isSubmitting }) => (
|
{({ isSubmitting }) => (
|
||||||
<Form>
|
<Form>
|
||||||
Name <Field type="text" name="name" /><br />
|
<label className="block mb-2 font-bold" htmlFor="name">
|
||||||
Description <Field type="text" name="description" /><br />
|
Name
|
||||||
Slug <Field disabled type="text" name="slug" /> <br />
|
</label>
|
||||||
Email <Field type="email" name="email" /><br />
|
<Field
|
||||||
<button type="submit" disabled={isSubmitting}>
|
className="w-full px-4 py-2 mb-4 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||||
Submit
|
type="text"
|
||||||
</button>
|
name="name"
|
||||||
</Form>
|
/>
|
||||||
|
|
||||||
|
<label className="block mb-2 font-bold" htmlFor="description">
|
||||||
|
Description
|
||||||
|
</label>
|
||||||
|
<Field
|
||||||
|
className="w-full px-4 py-2 mb-4 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||||
|
type="text"
|
||||||
|
name="description"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<label className="block mb-2 font-bold" htmlFor="slug">
|
||||||
|
Slug
|
||||||
|
</label>
|
||||||
|
<Field
|
||||||
|
className="w-full px-4 py-2 mb-4 border rounded-lg bg-gray-200 cursor-not-allowed"
|
||||||
|
disabled
|
||||||
|
type="text"
|
||||||
|
name="slug"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<label className="block mb-2 font-bold" htmlFor="email">
|
||||||
|
Email
|
||||||
|
</label>
|
||||||
|
<Field
|
||||||
|
className="w-full px-4 py-2 mb-4 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||||
|
type="email"
|
||||||
|
name="email"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
disabled={isSubmitting}
|
||||||
|
className="px-6 py-3 text-white bg-black rounded-lg shadow-md hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-black"
|
||||||
|
>
|
||||||
|
Submit
|
||||||
|
</button>
|
||||||
|
</Form>
|
||||||
|
|
||||||
)}
|
)}
|
||||||
</Formik>
|
</Formik>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,9 @@ const nextConfig = {
|
||||||
reactStrictMode: false,
|
reactStrictMode: false,
|
||||||
experimental: {
|
experimental: {
|
||||||
appDir : true,
|
appDir : true,
|
||||||
|
swcFileReading: false,
|
||||||
},
|
},
|
||||||
swcMinify: true,
|
swcMinify: false,
|
||||||
compiler: {
|
compiler: {
|
||||||
styledComponents: true,
|
styledComponents: true,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue