forked from eclipse-xpanse/xpanse-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'eclipse-xpanse:main' into main
- Loading branch information
Showing
36 changed files
with
617 additions
and
469 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* SPDX-FileCopyrightText: Huawei Inc. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { Button, Popover } from 'antd'; | ||
|
||
export function AgreementText({ eula }: { eula: string }): React.JSX.Element { | ||
return ( | ||
<Popover content={<pre className={'agreement-text'}>{eula}</pre>} title={'Eula'} trigger='hover'> | ||
<Button className={'ocl-data-hover'} type={'link'}> | ||
{'terms and conditions'} | ||
</Button> | ||
</Popover> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* SPDX-FileCopyrightText: Huawei Inc. | ||
*/ | ||
|
||
import React, { Dispatch, SetStateAction } from 'react'; | ||
import { Checkbox, Form, Space } from 'antd'; | ||
import '../../../../styles/service_order.css'; | ||
import { AgreementText } from '../../common/ocl/AgreementText'; | ||
import { CheckboxChangeEvent } from 'antd/es/checkbox'; | ||
|
||
export const EulaInfo = ({ | ||
eula, | ||
isEulaAccepted, | ||
setIsEulaAccepted, | ||
}: { | ||
eula: string | undefined; | ||
isEulaAccepted: boolean; | ||
setIsEulaAccepted: Dispatch<SetStateAction<boolean>>; | ||
}): React.JSX.Element => { | ||
const onChange = (e: CheckboxChangeEvent) => { | ||
setIsEulaAccepted(e.target.checked); | ||
}; | ||
|
||
return ( | ||
<> | ||
{eula && eula.length > 0 ? ( | ||
<div className={'cloud-provider-tab-class region-flavor-content'}> | ||
<Form.Item | ||
name='Terms and Conditions' | ||
label='Terms and Conditions' | ||
rules={[{ required: true, message: 'Eula needs to be accepted' }]} | ||
> | ||
<Space wrap> | ||
<Checkbox checked={isEulaAccepted} name='isEulaAccepted' onChange={onChange}> | ||
I have read and agreed to the <AgreementText eula={eula} /> of the service. | ||
</Checkbox> | ||
</Space> | ||
</Form.Item> | ||
</div> | ||
) : null} | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.