Ajout case à cocher CGU sur inscription et script création admin
- Inscription : checkbox obligatoire avec liens mentions légales et confidentialité - Script createAdmin.js pour créer le compte administrateur en base Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import { registerApi } from '../services/auth'
|
||||
export default function Inscription() {
|
||||
const navigate = useNavigate()
|
||||
const [form, setForm] = useState({ email: '', lastName: '', firstName: '', password: '' })
|
||||
const [acceptedTerms, setAcceptedTerms] = useState(false)
|
||||
const [showPassword, setShowPassword] = useState(false)
|
||||
const [error, setError] = useState('')
|
||||
const [loading, setLoading] = useState(false)
|
||||
@@ -132,9 +133,29 @@ export default function Inscription() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label className="flex items-start gap-3 cursor-pointer">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={acceptedTerms}
|
||||
onChange={(e) => setAcceptedTerms(e.target.checked)}
|
||||
required
|
||||
className="mt-0.5 w-4 h-4 accent-[#006B6B] flex-shrink-0"
|
||||
/>
|
||||
<span className="text-xs text-gray-500 leading-relaxed">
|
||||
J'accepte les{' '}
|
||||
<Link to="/mentions-legales" className="text-[#006B6B] hover:underline font-medium">
|
||||
conditions d'utilisation
|
||||
</Link>{' '}
|
||||
et la{' '}
|
||||
<Link to="/confidentialite" className="text-[#006B6B] hover:underline font-medium">
|
||||
politique de confidentialité
|
||||
</Link>
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
disabled={loading}
|
||||
disabled={loading || !acceptedTerms}
|
||||
className="w-full bg-[#006B6B] hover:bg-[#005959] disabled:opacity-60 text-white font-medium py-3 rounded-lg transition-colors"
|
||||
>
|
||||
{loading ? 'Inscription...' : "S'inscrire"}
|
||||
|
||||
Reference in New Issue
Block a user