function Generator({ location }: Props) { return ( <Layout> <Header> <Logo /> </Header> <SideNav /> <Content> <Form location={location} /> <LoadablePreview hideOnMobile /> </Content> <Footer> <Progress /> </Footer> </Layout> ) }
function categoryFormElements(props){ return ( <form onSubmit={props.handleSubmit}> <Field name="name" type="text" validate={required()} component={inputField} label="Category Name"/> <Field name="description" type="text" component={inputField} label="Description"/> <button type="submit">Submit</button> </form> ) }
function CustomFieldEditForm(props) { console.log(props.instance); let properties = props.instance.references.service_instance_properties; return ( <form> <FieldArray name="service_instance_properties" component={renderCustomProperty} formJSON={properties}/> <div className="text-right m-t-15"> <Buttons btnType="primary" text="Submit" onClick={props.handleSubmit} type="submit" value="submit"/> </div> </form> ) }
function BillingInfo(props) { return ( <form> <CardSection/> <Field name="name" type="text" component={inputField} placeholder="Name on the card"/> <Field name="address_line1" type="text" component={inputField} placeholder="Address"/> <Field name="address_city" type="text" component={inputField} placeholder="City"/> <Field name="address_state" type="text" component={inputField} placeholder="State"/> {/*<button type="submit">Submit</button>*/} <div className="text-right"> <Buttons btnType="primary" text="Save Card" onClick={props.handleSubmit} type="submit" value="submit"/> </div> </form> ) }
<Field key={index} name={`${customProperty}.data.value`}
function WebhookForm(props) { return ( <form> <Field name="endpoint_url" type="text" validate={[required(), url()]} component={inputField} placeholder="Endpoint URL: https://"/> {/*<Field name="async_lifecycle" type="select" component={inputField} placeholder="Asynchronous"/>*/} <Field className="form-control" name="async_lifecycle" component="select"> <option value="True">Asynchronous</option> <option value="False">Synchronous</option> </Field> <div className="text-right m-t-15"> <Buttons btnType="primary" text="Add endpoint" onClick={props.handleSubmit} type="submit" value="submit"/> </div> </form> ) }
function Category(props){ return ( <form onSubmit={props.handleSubmit}> <Field name="name" type="text" component={inputField} label="Name" validate={required()}/> <Field name="description" type="text" component={inputField} label="Description (Optional)"/> <div id="service-submission-box" className="button-box right"> <button className="btn btn-rounded btn-primary" type="submit"> Submit </button> </div> </form> ) }
render() { return ( <SignInForm onSubmit={this.handleSubmit.bind(this)} errors={this.state.errors} /> ); }
reduxForm({ form: FormNames.USER_FORGET_PASSWORD, validate, asyncValidate, asyncBlurFields: ['email'], })(connect(state => ({ apiEngine: state.apiEngine, }))(ForgetPasswordForm))
this.props.deleteMenu( values._id, site => { this.initForm(site); this.props.openSnackbar(hasBeenText('Menu item', values.name, 'deleted')); stopSubmit(); } )
function mapStateToProps(state) { const kernelValue = selector(state, 'kernel'); const costValue = selector(state, 'cost'); const nuValue = selector(state, 'nu'); const gammaValue = selector(state, 'gamma'); const typeValue = selector(state, 'type'); return { kernelValue, costValue, gammaValue, typeValue, nuValue, getValue: function (name) { return selector(state, name); } }; }
const TransformerArgListItem = ({ fieldName, transformerArg }) => ( <Field className={`transformer_arg_${transformerArg.name}`} name={`${fieldName}.value`} type="text" component={FormTextField} label={transformerArg.name} multiLine={transformerArg.type === 'text'} /> )
let ResetPasswordPage = (props) => ( <PageLayout> <PageHeader>Reset Password</PageHeader> <ResetPasswordForm /> </PageLayout> )
const SignInForm = (props) => { const { handleSubmit } = props; const errors = props.errors <= 0 ? null : renderErrors(props.errors); return ( <form onSubmit={handleSubmit}> {errors} <Field name="email" type="email" component={renderField} label="Email" /> <Field name="password" type="password" component={renderField} label="Password" /> <button type="submit" className="btn btn-primary">Sign in</button> </form> ); }
reduxForm({ form: FormNames.USER_RESET_PASSWORD, validate, })(connect(state => ({ apiEngine: state.apiEngine, routing: state.routing, }))(ChangePasswordForm))