mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 08:31:23 -05:00
use regular form instead of formik
This commit is contained in:
parent
a55442d07f
commit
1e99722801
1 changed files with 25 additions and 30 deletions
|
@ -3,12 +3,11 @@ import PropTypes from 'prop-types';
|
|||
import {connect} from 'react-redux';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
|
||||
import {Formik} from 'formik';
|
||||
import FormikInput from '../../../components/formik-forms/formik-input.jsx';
|
||||
|
||||
import ModalInnerContent from '../../../components/modal/base/modal-inner-content.jsx';
|
||||
|
||||
import TransferOwnershipTile from './transfer-ownership-tile.jsx';
|
||||
import Form from '../../../components/forms/form.jsx';
|
||||
import Input from '../../../components/forms/input.jsx';
|
||||
|
||||
import {selectUserId} from '../../../redux/session';
|
||||
import {managers} from '../lib/redux-modules';
|
||||
|
@ -44,39 +43,35 @@ const TransferOwnershipConfirmation = ({
|
|||
isCreator={true}
|
||||
/>
|
||||
</div>
|
||||
<Formik
|
||||
initialValues={{
|
||||
password: ''
|
||||
<Form
|
||||
onSubmit={formData => {
|
||||
console.log(formData.password);
|
||||
onTransferOwnership(newOwnerUsername, selectedId);
|
||||
}}
|
||||
>
|
||||
<FormikInput
|
||||
autoCapitalize="off"
|
||||
autoComplete="off"
|
||||
autoCorrect="off"
|
||||
className='join-flow-input'
|
||||
id="password"
|
||||
<Input
|
||||
required
|
||||
key="passwordInput"
|
||||
name="password"
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
type="password"
|
||||
/>
|
||||
</Formik>
|
||||
<div
|
||||
className="transfer-ownership-button-row"
|
||||
>
|
||||
<button
|
||||
className="button"
|
||||
onClick={handleBack}
|
||||
<div
|
||||
className="transfer-ownership-button-row"
|
||||
>
|
||||
<FormattedMessage id="studio.back" />
|
||||
</button>
|
||||
<button
|
||||
className="button"
|
||||
onClick={() => onTransferOwnership(newOwnerUsername, selectedId)}
|
||||
>
|
||||
<FormattedMessage id="studio.confirm" />
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
className="button"
|
||||
onClick={handleBack}
|
||||
>
|
||||
<FormattedMessage id="studio.back" />
|
||||
</button>
|
||||
<button
|
||||
className="button"
|
||||
type="submit"
|
||||
>
|
||||
<FormattedMessage id="studio.confirm" />
|
||||
</button>
|
||||
</div>
|
||||
</Form>
|
||||
</ModalInnerContent>
|
||||
</div>
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue