Use new common views for styles
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Helmet } from "react-helmet";
|
||||
import Form from "react-jsonschema-form";
|
||||
import { RouteComponentProps } from "react-router-dom";
|
||||
import AdminCreateCommon from "@views/admin/AdminCreateCommon";
|
||||
import MarkdownEditorWidget from "@components/Widgets/MarkdownEditorWidget";
|
||||
import { SignupForm, getForm, signupFormSendEmail } from "@models/SignupForm";
|
||||
|
||||
@@ -87,24 +87,23 @@ const SignupEmailPage: React.FC<SignupEmailPageProps> = ({ match: { params: { id
|
||||
const title = signupForm ? signupForm.title_fi : "Loading..."
|
||||
|
||||
return (
|
||||
<div>
|
||||
<>
|
||||
<Helmet>
|
||||
<link rel="canonical" href="https://sik.ayy.fi/admin/jobads/create" />
|
||||
</Helmet>
|
||||
<h1>{title}</h1>
|
||||
{statusMessage && <div className="success">{statusMessage}</div>}
|
||||
<Form
|
||||
schema={buildSchema(title) as any}
|
||||
uiSchema={buildUISchema()}
|
||||
// formData={formData}
|
||||
idPrefix="rjsf"
|
||||
widgets={widgets as any}
|
||||
// onChange={onChange}
|
||||
onSubmit={onSubmit}
|
||||
onError={onError}
|
||||
onFocus={onFocus} />
|
||||
{error && <div className="error">{error}</div>}
|
||||
</div>
|
||||
<AdminCreateCommon
|
||||
title={title}
|
||||
// formData={formData}
|
||||
schema={buildSchema(title)}
|
||||
UISchema={buildUISchema()}
|
||||
// onChange={onChange}
|
||||
onFocus={onFocus}
|
||||
onSubmit={onSubmit}
|
||||
statusMessage={statusMessage}
|
||||
error={error}
|
||||
widgets={widgets}
|
||||
/>
|
||||
</>
|
||||
)};
|
||||
|
||||
export default SignupEmailPage;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Helmet } from "react-helmet";
|
||||
import { RouteComponentProps } from "react-router-dom";
|
||||
import AdminListCommon from "@views/admin/AdminListCommon";
|
||||
import { SignupForm, getForm, getSignups } from "@models/SignupForm";
|
||||
import { Signup } from "@models/Signup";
|
||||
|
||||
@@ -31,7 +32,7 @@ const SignupEmailPage: React.FC<SignupEmailPageProps> = ({ match: { params: { id
|
||||
const title = signupForm ? signupForm.title_fi : "Loading..."
|
||||
|
||||
return (
|
||||
<div>
|
||||
<AdminListCommon>
|
||||
<Helmet>
|
||||
<link rel="canonical" href="https://sik.ayy.fi/admin/jobads/create" />
|
||||
</Helmet>
|
||||
@@ -56,7 +57,7 @@ const SignupEmailPage: React.FC<SignupEmailPageProps> = ({ match: { params: { id
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</AdminListCommon>
|
||||
)};
|
||||
|
||||
export default SignupEmailPage;
|
||||
|
||||
@@ -109,7 +109,7 @@ type AdminCreateCommonProps = {
|
||||
UISchema: {
|
||||
[name: string]: any;
|
||||
};
|
||||
onChange: (e: IChangeEvent<FormTypes>, es?: ErrorSchema) => any;
|
||||
onChange?: (e: IChangeEvent<FormTypes>, es?: ErrorSchema) => any;
|
||||
onFocus: (id: string, value: string | number | boolean) => void;
|
||||
onSubmit: (e: ISubmitEvent<FormTypes>) => any;
|
||||
statusMessage: string;
|
||||
|
||||
Reference in New Issue
Block a user