New feature on the account creation:

It automatically stores who created the code and adds the registered user to a group administrated by that creator
This commit is contained in:
Tiago Ribeiro
2023-10-10 23:00:36 +01:00
parent 1aa4f0ddfd
commit 634a396434
6 changed files with 55 additions and 13 deletions

View File

@@ -6,11 +6,12 @@ interface Props {
label?: string;
placeholder?: string;
defaultValue?: string;
disabled?: boolean;
name: string;
onChange: (value: string) => void;
}
export default function Input({type, label, placeholder, name, required = false, defaultValue, onChange}: Props) {
export default function Input({type, label, placeholder, name, required = false, defaultValue, disabled = false, onChange}: Props) {
const [showPassword, setShowPassword] = useState(false);
if (type === "password") {
@@ -53,9 +54,10 @@ export default function Input({type, label, placeholder, name, required = false,
<input
type={type}
name={name}
disabled={disabled}
onChange={(e) => onChange(e.target.value)}
placeholder={placeholder}
className="px-8 py-6 text-sm font-normal placeholder:text-mti-gray-cool bg-white rounded-full border border-mti-gray-platinum focus:outline-none"
className="px-8 py-6 text-sm font-normal placeholder:text-mti-gray-cool disabled:bg-mti-gray-platinum/40 disabled:text-mti-gray-dim disabled:cursor-not-allowed bg-white rounded-full border border-mti-gray-platinum focus:outline-none"
required={required}
defaultValue={defaultValue}
/>