mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
UI revised for registration
This commit is contained in:
@@ -241,6 +241,7 @@ export function RegisterForm({ className, ...props }) {
|
|||||||
<Input
|
<Input
|
||||||
id="given_name"
|
id="given_name"
|
||||||
placeholder="Juan"
|
placeholder="Juan"
|
||||||
|
className="text-sm"
|
||||||
{...regPersonal('given_name')}
|
{...regPersonal('given_name')}
|
||||||
/>
|
/>
|
||||||
{errPersonal.given_name && (
|
{errPersonal.given_name && (
|
||||||
@@ -255,6 +256,7 @@ export function RegisterForm({ className, ...props }) {
|
|||||||
<Input
|
<Input
|
||||||
id="last_name"
|
id="last_name"
|
||||||
placeholder="Dela Cruz"
|
placeholder="Dela Cruz"
|
||||||
|
className="text-sm"
|
||||||
{...regPersonal('last_name')}
|
{...regPersonal('last_name')}
|
||||||
/>
|
/>
|
||||||
{errPersonal.last_name && (
|
{errPersonal.last_name && (
|
||||||
@@ -272,6 +274,7 @@ export function RegisterForm({ className, ...props }) {
|
|||||||
<Input
|
<Input
|
||||||
id="middle_name"
|
id="middle_name"
|
||||||
placeholder="Santos"
|
placeholder="Santos"
|
||||||
|
className="text-sm"
|
||||||
{...regPersonal('middle_name')}
|
{...regPersonal('middle_name')}
|
||||||
/>
|
/>
|
||||||
{errPersonal.middle_name && (
|
{errPersonal.middle_name && (
|
||||||
@@ -289,6 +292,7 @@ export function RegisterForm({ className, ...props }) {
|
|||||||
<Input
|
<Input
|
||||||
id="extension_name"
|
id="extension_name"
|
||||||
placeholder="Jr., Sr., III"
|
placeholder="Jr., Sr., III"
|
||||||
|
className="text-sm"
|
||||||
{...regPersonal('extension_name')}
|
{...regPersonal('extension_name')}
|
||||||
/>
|
/>
|
||||||
{errPersonal.extension_name && (
|
{errPersonal.extension_name && (
|
||||||
@@ -304,6 +308,7 @@ export function RegisterForm({ className, ...props }) {
|
|||||||
id="date_of_birth"
|
id="date_of_birth"
|
||||||
type="date"
|
type="date"
|
||||||
max={new Date().toISOString().split('T')[0]}
|
max={new Date().toISOString().split('T')[0]}
|
||||||
|
className="text-sm"
|
||||||
{...regPersonal('date_of_birth')}
|
{...regPersonal('date_of_birth')}
|
||||||
/>
|
/>
|
||||||
{errPersonal.date_of_birth && (
|
{errPersonal.date_of_birth && (
|
||||||
@@ -320,6 +325,7 @@ export function RegisterForm({ className, ...props }) {
|
|||||||
<Input
|
<Input
|
||||||
id="occupation"
|
id="occupation"
|
||||||
placeholder="e.g. Real Estate Broker"
|
placeholder="e.g. Real Estate Broker"
|
||||||
|
className="text-sm"
|
||||||
{...regPersonal('occupation')}
|
{...regPersonal('occupation')}
|
||||||
/>
|
/>
|
||||||
{errPersonal.occupation && (
|
{errPersonal.occupation && (
|
||||||
@@ -336,6 +342,7 @@ export function RegisterForm({ className, ...props }) {
|
|||||||
id="phone"
|
id="phone"
|
||||||
type="tel"
|
type="tel"
|
||||||
placeholder="+63 912 345 6789"
|
placeholder="+63 912 345 6789"
|
||||||
|
className="text-sm"
|
||||||
{...regPersonal('phone')}
|
{...regPersonal('phone')}
|
||||||
/>
|
/>
|
||||||
{errPersonal.phone && (
|
{errPersonal.phone && (
|
||||||
@@ -388,6 +395,7 @@ export function RegisterForm({ className, ...props }) {
|
|||||||
disabled={isRegistering}
|
disabled={isRegistering}
|
||||||
readOnly
|
readOnly
|
||||||
onFocus={(e) => e.target.removeAttribute('readonly')}
|
onFocus={(e) => e.target.removeAttribute('readonly')}
|
||||||
|
className="text-sm"
|
||||||
{...regCreds('email')}
|
{...regCreds('email')}
|
||||||
/>
|
/>
|
||||||
{errCreds.email && (
|
{errCreds.email && (
|
||||||
@@ -407,7 +415,7 @@ export function RegisterForm({ className, ...props }) {
|
|||||||
placeholder="Min. 8 chars, 1 uppercase, 1 number"
|
placeholder="Min. 8 chars, 1 uppercase, 1 number"
|
||||||
autoComplete="new-password"
|
autoComplete="new-password"
|
||||||
disabled={isRegistering}
|
disabled={isRegistering}
|
||||||
className="pr-10"
|
className="pr-10 text-sm"
|
||||||
{...regCreds('password')}
|
{...regCreds('password')}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
@@ -437,7 +445,7 @@ export function RegisterForm({ className, ...props }) {
|
|||||||
placeholder="Repeat your password"
|
placeholder="Repeat your password"
|
||||||
autoComplete="new-password"
|
autoComplete="new-password"
|
||||||
disabled={isRegistering}
|
disabled={isRegistering}
|
||||||
className="pr-10"
|
className="pr-10 text-sm"
|
||||||
{...regCreds('confirm_password')}
|
{...regCreds('confirm_password')}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
@@ -465,6 +473,7 @@ export function RegisterForm({ className, ...props }) {
|
|||||||
id="group_code"
|
id="group_code"
|
||||||
placeholder="No group code"
|
placeholder="No group code"
|
||||||
disabled
|
disabled
|
||||||
|
className="text-sm"
|
||||||
{...regCreds('group_code')}
|
{...regCreds('group_code')}
|
||||||
/>
|
/>
|
||||||
<p className="text-xs text-muted-foreground">
|
<p className="text-xs text-muted-foreground">
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ import { Link } from 'react-router-dom'
|
|||||||
import { RegisterForm } from '../components/RegisterForm'
|
import { RegisterForm } from '../components/RegisterForm'
|
||||||
import { MetadataProvider } from '@/contexts/MetadataContext'
|
import { MetadataProvider } from '@/contexts/MetadataContext'
|
||||||
|
|
||||||
|
// TODO: flip to true once the hero banner asset is ready; grid auto-centers the
|
||||||
|
// left panel while this is false so no other classes need to change either way.
|
||||||
|
const SHOW_BANNER = false
|
||||||
|
|
||||||
export default function Register() {
|
export default function Register() {
|
||||||
return (
|
return (
|
||||||
<MetadataProvider
|
<MetadataProvider
|
||||||
@@ -27,7 +31,7 @@ export default function Register() {
|
|||||||
ogDescription: 'Create an account to access our online course platform.',
|
ogDescription: 'Create an account to access our online course platform.',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="grid min-h-svh lg:grid-cols-2">
|
<div className={`grid min-h-svh ${SHOW_BANNER ? 'lg:grid-cols-2' : ''}`}>
|
||||||
{/* ── Left panel ── */}
|
{/* ── Left panel ── */}
|
||||||
<div className="flex flex-col gap-4 p-6 md:p-10">
|
<div className="flex flex-col gap-4 p-6 md:p-10">
|
||||||
<div className="flex justify-center">
|
<div className="flex justify-center">
|
||||||
@@ -42,13 +46,14 @@ export default function Register() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-1 items-center justify-center">
|
<div className="flex flex-1 items-center justify-center">
|
||||||
<div className="w-full max-w-sm">
|
<div className="w-full max-w-xl">
|
||||||
<RegisterForm />
|
<RegisterForm />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* ── Right panel — hero image ── */}
|
{/* ── Right panel — hero image ── */}
|
||||||
|
{SHOW_BANNER && (
|
||||||
<div className="relative hidden lg:block">
|
<div className="relative hidden lg:block">
|
||||||
<img
|
<img
|
||||||
src="https://cq5as7pc73.ufs.sh/f/pHNnzIw3VjcgzIbC8SR4stTZRKXP3cfbD6e2p9jmdAUQBuox"
|
src="https://cq5as7pc73.ufs.sh/f/pHNnzIw3VjcgzIbC8SR4stTZRKXP3cfbD6e2p9jmdAUQBuox"
|
||||||
@@ -56,6 +61,7 @@ export default function Register() {
|
|||||||
className="absolute inset-0 h-full w-full object-cover rounded-3xl p-2"
|
className="absolute inset-0 h-full w-full object-cover rounded-3xl p-2"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</MetadataProvider>
|
</MetadataProvider>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user