mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
M: Prevent user from creating OSS from file
This commit is contained in:
parent
79c2050ed2
commit
15837d7a06
|
@ -114,9 +114,17 @@ function FormCreateItem() {
|
||||||
handleSelectLocation(initLocation);
|
handleSelectLocation(initLocation);
|
||||||
}, [initLocation, handleSelectLocation]);
|
}, [initLocation, handleSelectLocation]);
|
||||||
|
|
||||||
|
useLayoutEffect(() => {
|
||||||
|
if (itemType !== LibraryItemType.RSFORM) {
|
||||||
|
setFile(undefined);
|
||||||
|
setFileName('');
|
||||||
|
}
|
||||||
|
}, [itemType]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<form className={clsx('cc-column', 'min-w-[30rem] max-w-[30rem] mx-auto', 'px-6 py-3')} onSubmit={handleSubmit}>
|
<form className={clsx('cc-column', 'min-w-[30rem] max-w-[30rem] mx-auto', 'px-6 py-3')} onSubmit={handleSubmit}>
|
||||||
<h1>
|
<h1>
|
||||||
|
{itemType == LibraryItemType.RSFORM ? (
|
||||||
<Overlay position='top-0 right-[0.5rem]'>
|
<Overlay position='top-0 right-[0.5rem]'>
|
||||||
<input
|
<input
|
||||||
id='schema_file'
|
id='schema_file'
|
||||||
|
@ -132,6 +140,7 @@ function FormCreateItem() {
|
||||||
onClick={() => inputRef.current?.click()}
|
onClick={() => inputRef.current?.click()}
|
||||||
/>
|
/>
|
||||||
</Overlay>
|
</Overlay>
|
||||||
|
) : null}
|
||||||
Создание схемы
|
Создание схемы
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user