Use localized fields from be
This commit is contained in:
@@ -13,6 +13,8 @@ export interface Event {
|
||||
description_en: string;
|
||||
content_fi: string;
|
||||
content_en: string;
|
||||
location_fi: string;
|
||||
location_en: string;
|
||||
start_time: string;
|
||||
end_time: string;
|
||||
image: string;
|
||||
|
||||
@@ -168,7 +168,7 @@ class EventCreatePage extends React.Component<EventCreatePageProps, EventCreateP
|
||||
const schema = {
|
||||
title: formData.id ? formData.title_fi : "New Event",
|
||||
type: "object",
|
||||
required: ["title_fi", "title_en", "tags", "location", "start_time", "end_time", "description_fi", "description_en", "content_fi", "content_en"],
|
||||
required: ["title_fi", "title_en", "tags", "location_fi", "location_en", "start_time", "end_time", "description_fi", "description_en", "content_fi", "content_en"],
|
||||
properties: {
|
||||
tags: {
|
||||
type: "array",
|
||||
@@ -186,11 +186,6 @@ class EventCreatePage extends React.Component<EventCreatePageProps, EventCreateP
|
||||
title: "Visible",
|
||||
default: true,
|
||||
},
|
||||
location: {
|
||||
type: "string",
|
||||
title: "Location",
|
||||
default: "",
|
||||
},
|
||||
start_time: {
|
||||
type: "string",
|
||||
title: "Start time",
|
||||
@@ -237,6 +232,11 @@ class EventCreatePage extends React.Component<EventCreatePageProps, EventCreateP
|
||||
title: "Content",
|
||||
default: "",
|
||||
},
|
||||
location_fi: {
|
||||
type: "string",
|
||||
title: "Location",
|
||||
default: "",
|
||||
},
|
||||
english_section_divider: {
|
||||
title: "English",
|
||||
type: "string",
|
||||
@@ -256,6 +256,11 @@ class EventCreatePage extends React.Component<EventCreatePageProps, EventCreateP
|
||||
title: "Content",
|
||||
default: "",
|
||||
},
|
||||
location_en: {
|
||||
type: "string",
|
||||
title: "Location",
|
||||
default: "",
|
||||
},
|
||||
}
|
||||
};
|
||||
return schema;
|
||||
|
||||
@@ -129,11 +129,16 @@ class SignupCreatePage extends React.Component<SignupCreatePageProps, SignupCrea
|
||||
const schema = {
|
||||
title: formData.id ? formData.title : "New Sign-up form",
|
||||
type: "object",
|
||||
required: ["title", "start_time", "end_time", "questions"],
|
||||
required: ["title_fi", "title_en", "start_time", "end_time", "questions"],
|
||||
properties: {
|
||||
title: {
|
||||
title_fi: {
|
||||
type: "string",
|
||||
title: "Title",
|
||||
title: "Title (FI)",
|
||||
default: "",
|
||||
},
|
||||
title_en: {
|
||||
type: "string",
|
||||
title: "Title (EN)",
|
||||
default: "",
|
||||
},
|
||||
visible: {
|
||||
|
||||
Reference in New Issue
Block a user