You will be redirected to the new version in a few seconds.
+If you see this message for more than a minute, something has gone wrong.
+ +Redirecting...
; + } +} diff --git a/js/components/pages/OidcSilentCallback.js b/js/components/pages/OidcSilentCallback.js new file mode 100644 index 00000000..9b5d8a59 --- /dev/null +++ b/js/components/pages/OidcSilentCallback.js @@ -0,0 +1,16 @@ +import React from "react"; +import {getUserManager} from "../../utils/OidcUtils"; + +export default class AuthenticationSilentCallback extends React.Component { + constructor(props) { + super(props); + } + + componentDidMount() { + getUserManager().signinSilentCallback(); + } + + render() { + return ; + } +} diff --git a/js/components/record/RecordForm.js b/js/components/record/RecordForm.js index d1d245eb..d6892b96 100644 --- a/js/components/record/RecordForm.js +++ b/js/components/record/RecordForm.js @@ -15,8 +15,6 @@ import * as I18nStore from "../../stores/I18nStore"; // TODO enable s-forms-components // import SmartComponents from "s-forms-components"; -import "@kbss-cvut/s-forms/dist/s-forms.css"; -// import 's-forms-components/dist/s-forms-components.css' import 'react-datepicker/dist/react-datepicker.css'; // import "intelligent-tree-select/lib/styles.css" diff --git a/js/components/record/TypeaheadAnswer.js b/js/components/record/TypeaheadAnswer.js index fc1a0546..dc92d0a8 100644 --- a/js/components/record/TypeaheadAnswer.js +++ b/js/components/record/TypeaheadAnswer.js @@ -1,9 +1,10 @@ import React, {useEffect, useState} from "react"; -import {Constants, JsonLdObjectUtils} from "@kbss-cvut/s-forms"; +import {Constants} from "@kbss-cvut/s-forms"; import JsonLdUtils from "jsonld-utils"; import Select from 'react-select'; import {axiosBackend} from "../../actions"; import PropTypes from "prop-types"; +import JsonLdObjectUtils from "../../utils/JsonLdObjectUtils"; const fetchTypeAheadValues = async (endpointURL) => { const result = await axiosBackend.get(endpointURL); @@ -21,7 +22,10 @@ export const processTypeaheadOptions = (options, intl) => { // sort by property JsonLdObjectUtils.orderPreservingToplogicalSort(options, Constants.HAS_PRECEDING_VALUE); + // return true + return JsonLdUtils.processTypeaheadOptions(options, intl); + // return options }; @@ -59,7 +63,7 @@ const TypeaheadAnswer = (props) => { isLoading={isLoading} isClearable={true} isDisabled={isLoading} - value={options.filter((option) => option.id === props.value)} + value={options[0]} placeholder={''} getOptionLabel={(option) => option.name} getOptionValue={(option) => option.id} diff --git a/js/components/user/UserRow.js b/js/components/user/UserRow.js index 736b445a..46b00ee6 100644 --- a/js/components/user/UserRow.js +++ b/js/components/user/UserRow.js @@ -4,6 +4,7 @@ import withI18n from "../../i18n/withI18n"; import {Button} from "react-bootstrap"; import {LoaderSmall} from "../Loader"; import PropTypes from "prop-types"; +import IfInternalAuth from "../misc/oidc/IfInternalAuth"; let UserRow = (props) => { const user = props.user; @@ -17,13 +18,15 @@ let UserRow = (props) => {