1- import React , { useEffect , useContext , useState , useMemo , useCallback } from 'react'
2- import { Form , Button , FormGroup , Card , CardBody , Col , CustomInput } from 'Components'
1+ import React , { useEffect , useState , useMemo , useCallback } from 'react'
2+ import { Form , FormGroup , Card , CardBody , Col , CustomInput , Row } from 'Components'
33import GluuLabel from 'Routes/Apps/Gluu/GluuLabel'
44import GluuLoader from 'Routes/Apps/Gluu/GluuLoader'
55import GluuViewWrapper from 'Routes/Apps/Gluu/GluuViewWrapper'
66import GluuCommitDialog from 'Routes/Apps/Gluu/GluuCommitDialog'
7+ import GluuCommitFooter from 'Routes/Apps/Gluu/GluuCommitFooter'
78import { JSON_CONFIG } from 'Utils/ApiResources'
89import applicationStyle from 'Routes/Apps/Gluu/styles/applicationstyle'
910import { useDispatch , useSelector } from 'react-redux'
@@ -16,20 +17,17 @@ import { LOGGING_READ, LOGGING_WRITE } from 'Utils/PermChecker'
1617import { useCedarling } from '@/cedarling'
1718import { useTranslation } from 'react-i18next'
1819import SetTitle from 'Utils/SetTitle'
19- import { ThemeContext } from 'Context/theme/themeContext'
2020import GluuToogleRow from 'Routes/Apps/Gluu/GluuToogleRow'
2121import { getChangedFields , getMergedValues } from '@/helpers'
2222
2323function LoggingPage ( ) {
2424 const { t } = useTranslation ( )
2525 const { hasCedarPermission, authorize } = useCedarling ( )
26- const theme = useContext ( ThemeContext )
2726 const logging = useSelector ( ( state ) => state . loggingReducer . logging )
2827 const loading = useSelector ( ( state ) => state . loggingReducer . loading )
2928 const { permissions : cedarPermissions } = useSelector ( ( state ) => state . cedarPermissions )
3029
3130 const dispatch = useDispatch ( )
32- const selectedTheme = theme . state . theme
3331
3432 const [ showCommitDialog , setShowCommitDialog ] = useState ( false )
3533 const [ pendingValues , setPendingValues ] = useState ( null )
@@ -192,10 +190,17 @@ function LoggingPage() {
192190 />
193191
194192 { hasCedarPermission ( LOGGING_WRITE ) && (
195- < Button color = { `primary-${ selectedTheme } ` } type = "submit" >
196- < i className = "fa fa-check-circle me-2" > </ i >
197- { t ( 'actions.save' ) }
198- </ Button >
193+ < Row >
194+ < Col >
195+ < GluuCommitFooter
196+ saveHandler = { formik . handleSubmit }
197+ extraLabel = { t ( 'actions.cancel' ) }
198+ extraOnClick = { ( ) => formik . resetForm ( ) }
199+ hideButtons = { { save : true , back : true } }
200+ type = "submit"
201+ />
202+ </ Col >
203+ </ Row >
199204 ) }
200205 </ Form >
201206 ) }
0 commit comments