diff --git a/admin/src/components/ProposalDetail/index.tsx b/admin/src/components/ProposalDetail/index.tsx index ed83a145..02b76796 100644 --- a/admin/src/components/ProposalDetail/index.tsx +++ b/admin/src/components/ProposalDetail/index.tsx @@ -78,11 +78,19 @@ class ProposalDetailNaked extends React.Component { return ( - Are you sure you want to cancel proposal and begin -
- the refund process? This cannot be undone. -

+ isVersionTwo ? ( +

+ Are you sure you want to cancel proposal? +
+ This cannot be undone. +

+ ) : ( +

+ Are you sure you want to cancel proposal and begin +
+ the refund process? This cannot be undone. +

+ ) } placement="left" cancelText="cancel" diff --git a/backend/grant/proposal/views.py b/backend/grant/proposal/views.py index df26c73c..03b7fbe1 100644 --- a/backend/grant/proposal/views.py +++ b/backend/grant/proposal/views.py @@ -110,6 +110,9 @@ def post_proposal_comments(proposal_id, comment, parent_comment_id): if not proposal: return {"message": "No proposal matching id"}, 404 + if proposal.status != ProposalStatus.LIVE: + return {"message": "Proposal must be live to comment"}, 400 + # Make sure the parent comment exists parent = None if parent_comment_id: diff --git a/backend/grant/settings.py b/backend/grant/settings.py index fc5ad01e..687fdc92 100644 --- a/backend/grant/settings.py +++ b/backend/grant/settings.py @@ -60,7 +60,7 @@ LINKEDIN_CLIENT_SECRET = env.str("LINKEDIN_CLIENT_SECRET") BLOCKCHAIN_REST_API_URL = env.str("BLOCKCHAIN_REST_API_URL") BLOCKCHAIN_API_SECRET = env.str("BLOCKCHAIN_API_SECRET") -STAGING_PASSWORD = env.str("STAGING_PASSWORD") +STAGING_PASSWORD = env.str("STAGING_PASSWORD", default=None) EXPLORER_URL = env.str("EXPLORER_URL", default="https://chain.so/tx/ZECTEST/") diff --git a/frontend/client/components/AuthFlow/SignUp.tsx b/frontend/client/components/AuthFlow/SignUp.tsx index 41b0fffb..67b60eab 100644 --- a/frontend/client/components/AuthFlow/SignUp.tsx +++ b/frontend/client/components/AuthFlow/SignUp.tsx @@ -127,7 +127,8 @@ class SignUp extends React.Component { ev.preventDefault(); const { createUser } = this.props; this.props.form.validateFieldsAndScroll((err: any, values: any) => { - if (!err) { + const hasAgreed = this.props.form.getFieldValue('hasAgreed') + if (!err && hasAgreed) { delete values.passwordConfirm; createUser(values); } diff --git a/frontend/client/components/Proposal/CancelModal.tsx b/frontend/client/components/Proposal/CancelModal.tsx index c0bad93f..e0375fb1 100644 --- a/frontend/client/components/Proposal/CancelModal.tsx +++ b/frontend/client/components/Proposal/CancelModal.tsx @@ -11,7 +11,11 @@ interface Props { export default class CancelModal extends React.Component { render() { - const { isVisible, handleClose } = this.props; + const { + isVisible, + handleClose, + proposal: { isVersionTwo }, + } = this.props; return ( { onCancel={handleClose} >

- Are you sure you would like to cancel this proposal, and refund any - contributors? This cannot be undone. + Are you sure you would like to cancel this proposal + {isVersionTwo ? '' : ', and refund any contributors'}?{' '} + This cannot be undone.

- Canceled proposals cannot be deleted and will still be viewable by contributors - or anyone with a direct link. However, they will be de-listed everywhere else on - ZF Grants. + Canceled proposals cannot be deleted and will still be viewable by{' '} + {isVersionTwo ? '' : 'contributors or '} + anyone with a direct link. However, they will be de-listed everywhere else on ZF + Grants.

If you're sure you'd like to cancel, please{' '} diff --git a/frontend/client/components/Proposal/index.tsx b/frontend/client/components/Proposal/index.tsx index aa3ecb16..982bf6c1 100644 --- a/frontend/client/components/Proposal/index.tsx +++ b/frontend/client/components/Proposal/index.tsx @@ -110,7 +110,7 @@ export class ProposalDetail extends React.Component { const milestonesDisabled = proposal.isVersionTwo ? !proposal.acceptedWithFunding : false; - const defaultTab = milestonesDisabled ? 'discussions' : 'milestones'; + const defaultTab = !milestonesDisabled || !isLive ? 'milestones' : 'discussions'; const adminMenu = (

diff --git a/frontend/client/components/Settings/Account/TipJarAddress.tsx b/frontend/client/components/Settings/Account/TipJarAddress.tsx index f08c5e71..6a250534 100644 --- a/frontend/client/components/Settings/Account/TipJarAddress.tsx +++ b/frontend/client/components/Settings/Account/TipJarAddress.tsx @@ -77,7 +77,7 @@ export default class TipJarAddress extends React.Component { diff --git a/frontend/client/components/TipJar/TipJarProposalSettingsModal.tsx b/frontend/client/components/TipJar/TipJarProposalSettingsModal.tsx index 70ef2153..eb3e331f 100644 --- a/frontend/client/components/TipJar/TipJarProposalSettingsModal.tsx +++ b/frontend/client/components/TipJar/TipJarProposalSettingsModal.tsx @@ -106,7 +106,7 @@ class TipJarProposalSettingsModalBase extends React.Component { >