diff --git a/.env.example b/.env.example index e1d18c586..d04172438 100644 --- a/.env.example +++ b/.env.example @@ -18,4 +18,8 @@ NEXTAUTH_URL='http://localhost:3000' # You can also configure you own SMTP server using Nodemailer in sendMailts. (currently not possible via config) SENDGRID_API_KEY='' # Sender for signing requests and completion mails. -MAIL_FROM='' \ No newline at end of file +MAIL_FROM='' + +#FEATURE FLAGS +# Allow users to register via the /signup page. Otherwise they will be redirect to the home page. +ALLOW_SIGNUP=true \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 543c5e215..46768040d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ If you plan to contribute to Documenso, please take a moment to feel awesome ✨ ## Developing -The development branch is development. All pull request should be made against this branch. If you need help getting started, [join us on Slack](https://join.slack.com/t/documenso/shared_invite/zt-1qwxxsvli-nDyojjt~wakhgBGl9JRl2w). +The development branch is main. All pull request should be made against this branch. If you need help getting started, [join us on Slack](https://join.slack.com/t/documenso/shared_invite/zt-1qwxxsvli-nDyojjt~wakhgBGl9JRl2w). 1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then diff --git a/apps/web/components/editor/pdf-signer.tsx b/apps/web/components/editor/pdf-signer.tsx index 714194239..3c8627ca6 100644 --- a/apps/web/components/editor/pdf-signer.tsx +++ b/apps/web/components/editor/pdf-signer.tsx @@ -173,7 +173,11 @@ export default function PDFSigner(props: any) { FieldType.FREE_SIGNATURE ); - createOrUpdateField(props.document, freeSignatureField).then((res) => { + createOrUpdateField( + props.document, + freeSignatureField, + recipient.token + ).then((res) => { setFields((prevState) => [...prevState, res]); setDialogField(res); setOpen(true); diff --git a/apps/web/components/editor/pdf-viewer.jsx b/apps/web/components/editor/pdf-viewer.jsx index 43167ad11..1d3678b05 100644 --- a/apps/web/components/editor/pdf-viewer.jsx +++ b/apps/web/components/editor/pdf-viewer.jsx @@ -3,6 +3,7 @@ import { Document, Page } from "react-pdf/dist/esm/entry.webpack5"; import EditableField from "./editable-field"; import SignableField from "./signable-field"; import short from "short-uuid"; +import { FieldType } from "@prisma/client"; export default function PDFViewer(props) { const [numPages, setNumPages] = useState(null); @@ -71,21 +72,25 @@ export default function PDFViewer(props) { onRenderError={() => setLoading(false)} > {props?.fields - .filter((item) => item.page === index) - .map((item) => + .filter((field) => field.page === index) + .map((field) => props.readonly ? ( ) : (