Compare commits

...

2 Commits

Author SHA1 Message Date
Daniel Ternyak 6db04273a9
restore missing frontend 2021-10-21 01:15:40 +03:00
Daniel Ternyak 9b7df42c5e
disable TLD reject in SSR 2021-09-30 12:05:06 -04:00
7 changed files with 98 additions and 27 deletions

View File

@ -32,7 +32,8 @@ interface State extends Partial<ProposalDraft> {
brief: string;
target: string;
rfp?: RFP;
visible: boolean
visible: boolean;
postAgreementOptIn: boolean;
}
class CreateFlowBasics extends React.Component<Props, State> {
@ -43,6 +44,7 @@ class CreateFlowBasics extends React.Component<Props, State> {
brief: '',
target: '',
visible: false,
postAgreementOptIn: false,
...(props.initialState || {}),
};
}
@ -81,7 +83,7 @@ class CreateFlowBasics extends React.Component<Props, State> {
render() {
const { isUnlinkingProposalRFP } = this.props;
const { title, brief, target, rfp, rfpOptIn } = this.state;
const { title, brief, target, rfp, rfpOptIn, postAgreementOptIn } = this.state;
if (rfp && rfp.bounty && (target === null || target === '0')) {
this.setState({ target: rfp.bounty.toString() });
}
@ -124,7 +126,7 @@ class CreateFlowBasics extends React.Component<Props, State> {
<Alert
className='CreateFlow-rfpAlert'
type='warning'
message='KYC (know your customer)'
message='Terms & Conditions and KYC (know your customer)'
description={
<>
<div>
@ -132,12 +134,39 @@ class CreateFlowBasics extends React.Component<Props, State> {
provide identifying information to the Zcash Foundation.
<Radio.Group onChange={this.handleRfpOptIn}>
<Radio value={true} checked={rfpOptIn && rfpOptIn === true}>
<b>Yes</b>, I am willing to provide KYC information as outlined by the <span
onClick={() => this.showModal()} style={{ color: 'CF8A00', textDecoration: 'underline' }}>ZF KYC requirements</span>
<b>Yes</b>, I agree to all terms and conditions in the Grant Agreement and am willing to provide KYC
information as outlined in the <a target={'_blank'}
href={'https://www.zfnd.org/about/grant-agreement/'}>Grant
Agreement</a>
</Radio>
<Radio value={false} checked={rfpOptIn !== null && rfpOptIn === false}>
<b>No</b>, I do not wish to provide KYC information and understand I will not be able to submit my
proposal.
<b>No</b>, I do not agree to the <a target={'_blank'}
href={'https://www.zfnd.org/about/grant-agreement/'}>Grant
Agreement</a> and/or I do not wish to provide KYC information and understand I will not be able to
submit my proposal.
</Radio>
</Radio.Group>
</div>
</>
}
/>
<Alert
className='CreateFlow-rfpAlert'
type='warning'
message='Zcash Community Forum Post Agreement'
description={
<>
<div>
I acknowledge it is my responsibility to post the details of this request on the <a
href={'https://forum.zcashcommunity.com/'}>Zcash Community Forum</a> for community input prior to ZOMG
discussing and voting on this request.
<Radio.Group onChange={this.handlePostAgreementOptIn}>
<Radio value={true} checked={postAgreementOptIn && postAgreementOptIn === true}>
<b>Yes</b>
</Radio>
<Radio value={false} checked={postAgreementOptIn !== null && postAgreementOptIn === false}>
<b>No</b>
</Radio>
</Radio.Group>
</div>
@ -165,27 +194,39 @@ class CreateFlowBasics extends React.Component<Props, State> {
</li>
<li>The Foundation will run a Sanctions Screening and Fraud Monitoring on each recipient of its funds.
As a condition of receiving the funds you represent to us, now and until the latter of the submission of a
report on the status of the work covered by the proposal or the use of all of the funds, (i) that you are not
As a condition of receiving the funds you represent to us, now and until the latter of the submission
of a
report on the status of the work covered by the proposal or the use of all of the funds, (i) that you
are not
in violation of any law relating to terrorism or money laundering (Anti-Terrorism Laws), including
Executive Order No. 13224 on Terrorist Financing, effective September 24, 2001 (the Executive Order), and the
Executive Order No. 13224 on Terrorist Financing, effective September 24, 2001 (the Executive
Order), and the
Uniting and Strengthening America by Providing Appropriate Tools Required to Intercept and Obstruct
Terrorism Act of 2001(Title III of P.L. No. 107-56) (known as the PATRIOT Act). (ii) neither you or any affiliated
person or entity is a person that is listed in the annex to, or is otherwise subject to the provisions of,
the Executive Order or a person that is named as a specially designated national and blocked person on
the most current list published by the US Department of the Treasury, Office of Foreign Assets Control (OFAC) at its
Terrorism Act of 2001(Title III of P.L. No. 107-56) (known as the PATRIOT Act). (ii) neither you or
any affiliated
person or entity is a person that is listed in the annex to, or is otherwise subject to the provisions
of,
the Executive Order or a person that is named as a specially designated national and blocked person
on
the most current list published by the US Department of the Treasury, Office of Foreign Assets Control
(OFAC) at its
official website or any replacement website or other replacement official publication of such list;
(iii) neither you or any affiliated person or entity is subject to blocking provisions or otherwise a target of
sanctions imposed under any sanctions program administered by OFAC; and (iv) neither you or any affiliate person
(iii) neither you or any affiliated person or entity is subject to blocking provisions or otherwise a
target of
sanctions imposed under any sanctions program administered by OFAC; and (iv) neither you or any
affiliate person
or entity deals in, or otherwise engages in any transaction relating to any property or interests in
property blocked pursuant to the Executive Order.
</li>
<li>With certain limited exceptions, in the following January the Zcash Foundation will report the value
of the funds as taxable income on either US tax form 1099-MISC (for US taxpayers) or 1042-S (for foreign
persons). These forms will report the value of the award in USD at the date it was distributed. You may need to
of the funds as taxable income on either US tax form 1099-MISC (for US taxpayers) or 1042-S (for
foreign
persons). These forms will report the value of the award in USD at the date it was distributed. You
may need to
include this income when filing your taxes, and it may affect your total tax due and estimated tax
payments. Here are more details on <a href={'https://www.irs.gov/forms-pubs/about-form-1099-misc'}>filing the
payments. Here are more details on <a href={'https://www.irs.gov/forms-pubs/about-form-1099-misc'}>filing
the
1099-MISC</a> in the US, and its tax implications.
</li>
</ol>
@ -265,7 +306,7 @@ class CreateFlowBasics extends React.Component<Props, State> {
);
}
private handleInputChange = (
handleInputChange = (
event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>,
) => {
const { value, name } = event.currentTarget;
@ -274,13 +315,20 @@ class CreateFlowBasics extends React.Component<Props, State> {
});
};
private handleRfpOptIn = (e: RadioChangeEvent) => {
handleRfpOptIn = (e: RadioChangeEvent) => {
this.setState({ rfpOptIn: e.target.value }, () => {
this.props.updateForm(this.state);
});
};
private unlinkRfp = () => {
handlePostAgreementOptIn = (e: RadioChangeEvent) => {
this.setState({ postAgreementOptIn: e.target.value }, () => {
this.props.updateForm(this.state);
});
};
unlinkRfp = () => {
this.props.unlinkProposalRFP(this.props.proposalId);
};
}

View File

@ -136,7 +136,7 @@ const MilestoneFields = ({
<Input.TextArea
rows={3}
name="content"
placeholder="Description of what will be delivered"
placeholder="Description of what will be delivered. Deliverables must be specific and verifiable upon completion. Consider how success will be measured for individual deliverables and then the project overall."
value={milestone.content}
onChange={ev =>
onChange(index, { ...milestone, content: ev.currentTarget.value })
@ -192,7 +192,7 @@ const MilestoneFields = ({
>
<span style={{ opacity: 0.7 }}>Payout Immediately</span>
</Checkbox>
<Tooltip title="Allows the milestone to be paid out immediately if the proposal is accepted with funding.">
<Tooltip title="&quot;Payout Immediately&quot; should only be selected if there are demonstrable startup costs for this project.">
<Icon type="info-circle" style={{ fontSize: '16px' }} />
</Tooltip>
</div>

View File

@ -1,7 +1,7 @@
import React from 'react';
import { connect } from 'react-redux';
import { Timeline } from 'antd';
import { getCreateErrors, KeyOfForm, FIELD_NAME_MAP } from 'modules/create/utils';
import { FIELD_NAME_MAP, getCreateErrors, KeyOfForm } from 'modules/create/utils';
import Markdown from 'components/Markdown';
import UserAvatar from 'components/UserAvatar';
import { AppState } from 'store/reducers';
@ -52,6 +52,11 @@ class CreateReview extends React.Component<Props> {
content: <div>{form.rfpOptIn ? 'Accepted' : 'Declined'}</div>,
error: errors.rfpOptIn,
},
{
key: 'postAgreementOptIn',
content: <div>{form.postAgreementOptIn ? 'Accepted' : 'Declined'}</div>,
error: errors.postAgreementOptIn,
},
{
key: 'brief',
content: form.brief,

View File

@ -86,9 +86,16 @@ const STEP_INFO: { [key in CREATE_STEP]: StepInfo } = {
[CREATE_STEP.MILESTONES]: {
short: 'Milestones',
title: 'Set up milestones for deliverables',
subtitle: 'Make a timeline of when youll complete tasks, and receive funds',
subtitle: (
<>
Make a timeline of when youll complete tasks, and receive funds. <br />
Milestone deliverables must be specific and verifiable upon completion. <br />
Consider how success will be measured, both for individual deliverables, and the
project overall.
</>
),
help:
'Contributors are more willing to fund proposals with funding spread across multiple milestones',
'ZOMG & ZF are more willing to fund proposals with milestones based on verifiable deliverables.',
component: Milestones,
},
[CREATE_STEP.PAYMENT]: {
@ -146,6 +153,7 @@ class CreateFlow extends React.Component<Props, State> {
queryStep && CREATE_STEP[queryStep]
? (CREATE_STEP[queryStep] as CREATE_STEP)
: CREATE_STEP.BASICS;
// @ts-ignore
const noExplain = !!ls<LSExplainer>('noExplain');
this.state = {

View File

@ -24,6 +24,7 @@ import {
interface CreateFormErrors {
rfpOptIn?: string;
postAgreementOptIn?: string;
title?: string;
brief?: string;
target?: string;
@ -37,6 +38,7 @@ interface CreateFormErrors {
export type KeyOfForm = keyof CreateFormErrors;
export const FIELD_NAME_MAP: { [key in KeyOfForm]: string } = {
rfpOptIn: 'KYC',
postAgreementOptIn: 'Zcash Community Forum',
title: 'Title',
brief: 'Brief',
target: 'Target amount',
@ -64,6 +66,7 @@ export function getCreateErrors(
tipJarAddress,
rfpOptIn,
brief,
postAgreementOptIn,
} = form;
// Required fields with no extra validation
@ -87,6 +90,10 @@ export function getCreateErrors(
errors.rfpOptIn = 'Please accept KYC to submit.';
}
if (!postAgreementOptIn) {
errors.postAgreementOptIn = 'Please agree to post on the Zcash Community Forum';
}
// Title
if (title && title.length > 60) {
errors.title = 'Title can only be 60 characters maximum';

View File

@ -17,6 +17,8 @@ import log from './log';
import serverRender from './render';
import i18n from './i18n';
// @ts-ignore
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;
process.env.SERVER_SIDE_RENDER = 'true';
const isDev = process.env.NODE_ENV === 'development';

View File

@ -54,6 +54,7 @@ export interface ProposalDraft {
deadlineDuration?: number;
rfp?: RFP;
rfpOptIn?: boolean;
postAgreementOptIn?: boolean;
}
export interface Proposal extends Omit<ProposalDraft, 'target' | 'invites'> {