-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start working on improved license form for images
- Loading branch information
1 parent
2fc3124
commit 88621bd
Showing
11 changed files
with
318 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { useTranslation } from "react-i18next"; | ||
import { TextField } from "@mui/material"; | ||
import React from "react"; | ||
import { useField } from "formik"; | ||
|
||
export function LicenseAuthor(props: { fieldName: string }) { | ||
const [t] = useTranslation(); | ||
const [field, meta] = useField(props.fieldName); | ||
|
||
return <TextField | ||
fullWidth | ||
id={props.fieldName} | ||
label={t("licenses.authors")} | ||
variant="standard" | ||
error={meta.touched && Boolean(meta.error)} | ||
helperText={meta.touched && meta.error} | ||
{...field} | ||
/>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { useTranslation } from "react-i18next"; | ||
import { TextField } from "@mui/material"; | ||
import React from "react"; | ||
import { useField } from "formik"; | ||
|
||
export function LicenseAuthorUrl(props: { fieldName: string }) { | ||
const [t] = useTranslation(); | ||
const [field, meta] = useField(props.fieldName); | ||
|
||
return <TextField | ||
fullWidth | ||
id={props.fieldName} | ||
label={t("licenses.authorProfile")} | ||
variant="standard" | ||
placeholder={"https://"} | ||
error={meta.touched && Boolean(meta.error)} | ||
helperText={meta.touched && meta.error} | ||
{...field} | ||
/>; | ||
} |
20 changes: 20 additions & 0 deletions
20
src/components/Common/forms/LicenseDerivativeSourceUrl.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { useTranslation } from "react-i18next"; | ||
import { TextField } from "@mui/material"; | ||
import React from "react"; | ||
import { useField } from "formik"; | ||
|
||
export function LicenseDerivativeSourceUrl(props: { fieldName: string }) { | ||
const [t] = useTranslation(); | ||
const [field, meta] = useField(props.fieldName); | ||
|
||
return <TextField | ||
fullWidth | ||
id={props.fieldName} | ||
label={t("licenses.derivativeSourceUrl")} | ||
variant="standard" | ||
placeholder={"https://"} | ||
error={meta.touched && Boolean(meta.error)} | ||
helperText={t("licenses.derivativeSourceUrlHelper") || meta.touched && meta.error} | ||
{...field} | ||
/>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { useTranslation } from "react-i18next"; | ||
import { TextField } from "@mui/material"; | ||
import React from "react"; | ||
import { useField } from "formik"; | ||
|
||
export function LicenseObjectUrl(props: { fieldName: string }) { | ||
const [t] = useTranslation(); | ||
const [field, meta] = useField(props.fieldName); | ||
|
||
return <TextField | ||
fullWidth | ||
id={props.fieldName} | ||
label={t("licenses.originalObjectUrl")} | ||
variant="standard" | ||
placeholder={"https://"} | ||
error={meta.touched && Boolean(meta.error)} | ||
helperText={meta.touched && meta.error} | ||
{...field} | ||
/>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { useTranslation } from "react-i18next"; | ||
import { TextField } from "@mui/material"; | ||
import React from "react"; | ||
import { useField } from "formik"; | ||
|
||
export function LicenseTitle(props: { fieldName: string }) { | ||
const [t] = useTranslation(); | ||
const [field, meta] = useField(props.fieldName); | ||
|
||
return <TextField | ||
fullWidth | ||
id={props.fieldName} | ||
label={t("licenses.originalTitle")} | ||
variant="standard" | ||
error={meta.touched && Boolean(meta.error)} | ||
helperText={meta.touched && meta.error} | ||
{...field} | ||
/>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.