Add submission disabled alert and disable submission

This commit is contained in:
Daniel Ternyak 2019-11-20 16:38:25 -06:00
parent 11966b5060
commit 7d348aed0d
No known key found for this signature in database
GPG Key ID: DF212D2DC5D0E245
2 changed files with 47 additions and 2 deletions

View File

@ -38,6 +38,20 @@
padding-bottom: 2rem;
}
&-notice {
display: flex;
flex: 1;
min-width: 100%;
font-size: 1.5rem;
padding: 0 2rem;
&-alert {
margin: 2rem auto 0;
max-width: 950px;
}
}
&-footer {
position: fixed;
bottom: 0;
@ -51,6 +65,10 @@
background: #fff;
border-top: 1px solid #eee;
z-index: 1000;
flex-wrap: wrap;
&-help {
font-size: 1rem;

View File

@ -19,6 +19,7 @@ import createExampleProposal from './example';
import { createActions } from 'modules/create';
import { ProposalDraft } from 'types';
import { getCreateErrors } from 'modules/create/utils';
import { Alert } from 'antd';
import { AppState } from 'store/reducers';
@ -196,8 +197,32 @@ class CreateFlow extends React.Component<Props, State> {
);
}
const proposalSubmissionDisabled = true;
return (
<div>
{proposalSubmissionDisabled && (
<div className={'CreateFlow-notice'}>
{' '}
<Alert
className={'CreateFlow-notice-alert'}
message="Proposal Submissions Are Disabled"
description={
<>
Changes are coming to ZF Grants. To prepare for these changes, we're
temporarily disabling proposal submissions.
<br />
To get notified once admissions are re-opened, you can subscribe to the
Zcash Foundation
<a href={'https://www.zfnd.org/'}> newsletter </a>
or monitor the <a href={'https://www.zfnd.org/blog/'}>blog</a>.
</>
}
type="warning"
showIcon
/>
</div>
)}
{content}
{showFooter && (
<div className="CreateFlow-footer">
@ -214,14 +239,16 @@ class CreateFlow extends React.Component<Props, State> {
className="CreateFlow-footer-button is-primary"
key="submit"
onClick={this.openPublishWarning}
disabled={this.checkFormErrors()}
disabled={this.checkFormErrors() || proposalSubmissionDisabled}
>
Submit
</button>
</>
) : (
<>
<div className="CreateFlow-footer-help">{info.help}</div>
<div className="CreateFlow-footer-help">
<p>{info.help}</p>
</div>
<button
className="CreateFlow-footer-button"
key="next"