Remove ToS checkbox

This commit is contained in:
Sean Yesmunt 2018-11-05 16:08:27 -05:00
parent eaf10b6ce8
commit d775de69e7
2 changed files with 8 additions and 31 deletions

View file

@ -35,7 +35,6 @@ type Props = {
}, },
channel: string, channel: string,
name: ?string, name: ?string,
tosAccepted: boolean,
updatePublishForm: UpdatePublishFormData => void, updatePublishForm: UpdatePublishFormData => void,
nameError: ?string, nameError: ?string,
isResolvingUri: boolean, isResolvingUri: boolean,
@ -248,7 +247,6 @@ class PublishForm extends React.PureComponent<Props> {
title, title,
bid, bid,
bidError, bidError,
tosAccepted,
editingURI, editingURI,
isStillEditing, isStillEditing,
filePath, filePath,
@ -262,7 +260,6 @@ class PublishForm extends React.PureComponent<Props> {
title && title &&
bid && bid &&
!bidError && !bidError &&
tosAccepted &&
!(uploadThumbnailStatus === THUMBNAIL_STATUSES.IN_PROGRESS); !(uploadThumbnailStatus === THUMBNAIL_STATUSES.IN_PROGRESS);
return editingURI && !filePath ? isStillEditing && formValidLessFile : formValidLessFile; return editingURI && !filePath ? isStillEditing && formValidLessFile : formValidLessFile;
} }
@ -274,7 +271,6 @@ class PublishForm extends React.PureComponent<Props> {
title, title,
bid, bid,
bidError, bidError,
tosAccepted,
editingURI, editingURI,
filePath, filePath,
isStillEditing, isStillEditing,
@ -296,7 +292,6 @@ class PublishForm extends React.PureComponent<Props> {
{uploadThumbnailStatus === THUMBNAIL_STATUSES.IN_PROGRESS && ( {uploadThumbnailStatus === THUMBNAIL_STATUSES.IN_PROGRESS && (
<div>{__('Please wait for thumbnail to finish uploading')}</div> <div>{__('Please wait for thumbnail to finish uploading')}</div>
)} )}
{!tosAccepted && <div>{__('You must agree to the terms of service')}</div>}
{!!editingURI && {!!editingURI &&
!isStillEditing && !isStillEditing &&
!filePath && <div>{__('You need to reselect a file after changing the LBRY URL')}</div>} !filePath && <div>{__('You need to reselect a file after changing the LBRY URL')}</div>}
@ -319,7 +314,6 @@ class PublishForm extends React.PureComponent<Props> {
price, price,
channel, channel,
name, name,
tosAccepted,
updatePublishForm, updatePublishForm,
bid, bid,
nameError, nameError,
@ -593,28 +587,6 @@ class PublishForm extends React.PureComponent<Props> {
/> />
</section> </section>
<section className="card card--section">
<div className="card__title">{__('Terms of Service')}</div>
<div className="card__content">
<FormField
name="lbry_tos"
type="checkbox"
checked={tosAccepted}
postfix={
<span>
{__('I agree to the')}{' '}
<Button
button="link"
href="https://www.lbry.io/termsofservice"
label={__('LBRY terms of service')}
/>
</span>
}
onChange={event => updatePublishForm({ tosAccepted: event.target.checked })}
/>
</div>
</section>
<div className="card__actions"> <div className="card__actions">
<Submit <Submit
label={submitLabel} label={submitLabel}
@ -626,6 +598,14 @@ class PublishForm extends React.PureComponent<Props> {
/> />
<Button button="alt" onClick={this.handleCancelPublish} label={__('Cancel')} /> <Button button="alt" onClick={this.handleCancelPublish} label={__('Cancel')} />
</div> </div>
<div className="card__subtitle">
{__('By continuing, you accept the')}{' '}
<Button
button="link"
href="https://www.lbry.io/termsofservice"
label={__('LBRY terms of service')}
/>.
</div>
{!formDisabled && !formValid && this.renderFormErrors()} {!formDisabled && !formValid && this.renderFormErrors()}
</div> </div>
</Form> </Form>

View file

@ -20,7 +20,6 @@ type PublishState = {
uploadThumbnailStatus: string, uploadThumbnailStatus: string,
description: string, description: string,
language: string, language: string,
tosAccepted: boolean,
channel: string, channel: string,
channelId: ?string, channelId: ?string,
name: string, name: string,
@ -44,7 +43,6 @@ export type UpdatePublishFormData = {
thumbnailPath?: string, thumbnailPath?: string,
description?: string, description?: string,
language?: string, language?: string,
tosAccepted?: boolean,
channel?: string, channel?: string,
channelId?: string, channelId?: string,
name?: string, name?: string,
@ -103,7 +101,6 @@ const defaultState: PublishState = {
nsfw: false, nsfw: false,
channel: CHANNEL_ANONYMOUS, channel: CHANNEL_ANONYMOUS,
channelId: '', channelId: '',
tosAccepted: false,
name: '', name: '',
nameError: undefined, nameError: undefined,
bid: 0.1, bid: 0.1,