Clean up event create page

This commit is contained in:
Jan Tuomi
2019-03-11 21:51:10 +02:00
parent 57ed100481
commit 74d990b1db
2 changed files with 38 additions and 11 deletions
+22 -1
View File
@@ -1,3 +1,24 @@
.event-create-page {
width: inherit;
width: 100%;
fieldset {
border: none;
padding: 0;
margin: 1rem 0;
}
option {
padding: 4px 8px;
cursor: pointer;
}
input[type="text"],
option {
min-width: 12rem;
}
legend {
font-weight: bold;
margin: 0.5rem 0;
}
}
+16 -10
View File
@@ -1,7 +1,6 @@
import * as React from "react";
import Helmet from "react-helmet";
import "./EventCreatePage.scss";
import { async } from "q";
import { isAuthenticated } from "../../auth";
import Form from "react-jsonschema-form";
@@ -9,18 +8,24 @@ export interface EventCreatePageProps {}
export interface EventCreatePageState {
}
class EventCreatePage extends React.Component<EventCreatePageProps, EventCreatePageState> {
render() {
const schema = {
title: "Uusi tapahtuma",
title: "New Event",
type: "object",
required: ["title"],
properties: {
title: {type: "string", title: "Name", default: "Name for the event"},
location: {type: "string", title: "Location", defailt: "Location for the event"},
title: {
type: "string",
title: "Name",
default: ""
},
location: {
type: "string",
title: "Location",
default: "",
},
multipleChoicesList: {
type: "array",
title: "Event type",
@@ -42,11 +47,12 @@ class EventCreatePage extends React.Component<EventCreatePageProps, EventCreateP
<Helmet>
<link rel="canonical" href="https://sik.ayy.fi/admin/events/create" />
</Helmet>
Event Create Page
<h1>Create Event</h1>
<Form schema={schema}
onChange={console.log("cahnged")}
onSubmit={console.log("submitted")}
onError={console.log("error")} />
idPrefix="rjsf"
onChange={() => console.log("changed")}
onSubmit={() => console.log("submitted")}
onError={() => console.log("error")} />
</div>
);
}