web: files: fix fields validation without credentials data
This commit is contained in:
parent
7e992ef248
commit
52ac07dde9
@ -106,15 +106,12 @@ const PureConnectDialogContainer = (props) => {
|
||||
const onChangeFolderName = (e) => setCustomerTitleValue(e.target.value);
|
||||
const onChangeMakeShared = (e) => setMakeShared(!isCorporate);
|
||||
|
||||
const isEmptyField = [
|
||||
urlValue,
|
||||
loginValue,
|
||||
passwordValue,
|
||||
customerTitle,
|
||||
].some((el) => el.trim().length === 0);
|
||||
const providerData = [customerTitle];
|
||||
if (!item.link) providerData.push(urlValue, loginValue, passwordValue);
|
||||
const isEmptyField = providerData.some((el) => el.trim().length === 0);
|
||||
|
||||
const onSave = () => {
|
||||
//if (isEmptyField) return toastr.error(t("EmptyField"));
|
||||
if (isEmptyField) return toastr.error(t("EmptyField"));
|
||||
|
||||
onClose();
|
||||
setIsLoading(true);
|
||||
|
Loading…
Reference in New Issue
Block a user