Fix bug 66883 - Accounts:Change quota. When changing the quota, the default limit is always indicated in the modal dialog.

This commit is contained in:
Tatiana Lopaeva 2024-03-20 15:34:23 +03:00
parent 1a5f1b9647
commit fa5436037e
4 changed files with 29 additions and 32 deletions

View File

@ -1,25 +1,25 @@
// (c) Copyright Ascensio System SIA 2010-2024
//
//
// This program is a free software product.
// You can redistribute it and/or modify it under the terms
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
// any third-party rights.
//
//
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
//
//
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
//
//
// The interactive user interfaces in modified source and object code versions of the Program must
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
//
//
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
// trademark law for use of our trademarks.
//
//
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
@ -44,7 +44,7 @@ const ChangeQuotaEvent = (props) => {
setCustomRoomQuota,
successCallback,
abortCallback,
initialSize,
inRoom,
setNewInfoPanelSelection,
needResetSelection,
@ -55,7 +55,7 @@ const ChangeQuotaEvent = (props) => {
const { t } = useTranslation("Common");
const [isLoading, setIsLoading] = useState(false);
const [isError, setIsError] = useState(false);
const [size, setSize] = useState(initialSize);
const [size, setSize] = useState();
const onSetQuotaBytesSize = (size) => {
setSize(size);
@ -123,7 +123,6 @@ const ChangeQuotaEvent = (props) => {
headerTitle={headerTitle}
isError={isError}
isLoading={isLoading}
initialSize={initialSize}
size={size}
/>
);
@ -146,14 +145,11 @@ export default inject(
setInfoPanelSelection,
} = infoPanelStore;
const initialSize = type === "user" ? defaultUsersQuota : defaultRoomsQuota;
const inRoom = infoPanelSelection?.inRoom;
const needResetSelection =
type === "user" ? needResetUserSelection : needResetFilesSelection;
return {
initialSize,
setCustomUserQuota,
setCustomRoomQuota,
inRoom,

View File

@ -1,25 +1,25 @@
// (c) Copyright Ascensio System SIA 2010-2024
//
//
// This program is a free software product.
// You can redistribute it and/or modify it under the terms
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
// any third-party rights.
//
//
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
//
//
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
//
//
// The interactive user interfaces in modified source and object code versions of the Program must
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
//
//
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
// trademark law for use of our trademarks.
//
//
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
@ -66,7 +66,7 @@ const ChangeQuotaDialog = (props) => {
primary
onClick={onSaveClick}
isLoading={isLoading}
isDisabled={initialSize == size}
isDisabled={initialSize == size || size.trim() === ""}
scale
/>
<Button

View File

@ -1,25 +1,25 @@
// (c) Copyright Ascensio System SIA 2010-2024
//
//
// This program is a free software product.
// You can redistribute it and/or modify it under the terms
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
// any third-party rights.
//
//
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
//
//
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
//
//
// The interactive user interfaces in modified source and object code versions of the Program must
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
//
//
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
// trademark law for use of our trademarks.
//
//
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
@ -140,6 +140,7 @@ const ChangeStorageQuotaDialog = (props) => {
primary
onClick={onSaveClick}
isLoading={isLoading}
isDisabled={!isDisableQuota && size.trim() === ""}
scale
/>
<Button

View File

@ -1,25 +1,25 @@
// (c) Copyright Ascensio System SIA 2010-2024
//
//
// This program is a free software product.
// You can redistribute it and/or modify it under the terms
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
// any third-party rights.
//
//
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
//
//
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
//
//
// The interactive user interfaces in modified source and object code versions of the Program must
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
//
//
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
// trademark law for use of our trademarks.
//
//
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
@ -103,7 +103,7 @@ const DiskSpaceUsedComponent = (props) => {
return (
<StyledDiscSpaceUsedComponent>
{standalone && (
{standalone && isVisibleDialog && (
<ChangeStorageQuotaDialog
isDisableQuota={isDisableQuota}
isVisible={isVisibleDialog}