diff --git a/invenio_communities/assets/semantic-ui/js/invenio_communities/subcommunity/new.js b/invenio_communities/assets/semantic-ui/js/invenio_communities/subcommunity/new.js
index 802734443..bf73e1d47 100644
--- a/invenio_communities/assets/semantic-ui/js/invenio_communities/subcommunity/new.js
+++ b/invenio_communities/assets/semantic-ui/js/invenio_communities/subcommunity/new.js
@@ -14,7 +14,6 @@ import PropTypes from "prop-types";
import React, { Component } from "react";
import ReactDOM from "react-dom";
import {
- CustomFields,
FieldLabel,
RadioField,
SelectField,
@@ -25,6 +24,7 @@ import {
import { Button, Divider, Form, Grid, Header, Icon, Message } from "semantic-ui-react";
import { CommunityApi } from "../api";
import { communityErrorSerializer } from "../api/serializers";
+import Overridable, { OverridableContext, overrideStore } from "react-overridable";
const IdentifierField = ({ formConfig }) => {
const { values } = useFormikContext();
@@ -150,163 +150,162 @@ class CommunityCreateForm extends Component {
};
render() {
- const { formConfig, canCreateRestricted } = this.props;
+ const { formConfig, canCreateRestricted, communityId } = this.props;
const { hasCommunity, communities, error } = this.state;
return (
-
+ )}
+ {!hasCommunity && (
+ <>
+ {
+ e.key === "Enter" && e.preventDefault();
+ }}
+ label={
+
+ }
+ />
+
+ >
+ )}
+ {canCreateRestricted && (
+ <>
+ {i18next.t("Community visibility")}
+ {formConfig.access.visibility.map((item) => (
+
+ {
+ formikProps.form.setFieldValue(
+ "access.visibility",
+ item.value
+ );
+ }}
+ />
+
+
+ ))}
+ >
+ )}
+
+
+
+
+
+
+
+
+
+ )}
+
+
);
}
}
@@ -319,17 +318,18 @@ CommunityCreateForm.propTypes = {
const domContainer = document.getElementById("app");
const formConfig = JSON.parse(domContainer.dataset.formConfig);
-const customFields = JSON.parse(domContainer.dataset.customFields);
const canCreateRestricted = JSON.parse(domContainer.dataset.canCreateRestricted);
const communityId = domContainer.dataset.communityId;
+const overriddenComponents = overrideStore.getAll();
ReactDOM.render(
- ,
+
+
+ ,
domContainer
);
export default CommunityCreateForm;