1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-21 13:57:56 +03:00

F #6201: remove uppercase en custom attributes (#2618)

This commit is contained in:
Jorge Miguel Lobo Escalona 2023-05-19 12:43:11 +02:00 committed by GitHub
parent 779d0ba041
commit 5a7d3fea7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and *
* limitations under the License. *
* ------------------------------------------------------------------------- */
import { memo, useMemo, useCallback } from 'react'
import PropTypes from 'prop-types'
import { memo, useCallback, useMemo } from 'react'
import { AddSquare as AddIcon } from 'iconoir-react'
import { Box, TextField } from '@mui/material'
import { AddSquare as AddIcon } from 'iconoir-react'
import { useForm } from 'react-hook-form'
import { SubmitButton } from 'client/components/FormControl'
@ -40,10 +40,7 @@ const AttributeCreateForm = memo(({ handleAdd }) => {
if (!name || !value || formState.isSubmitting) return
const upperName = `${name}`.toUpperCase()
const upperValue = `${value}`.toUpperCase()
await handleAdd?.(upperName, upperValue)
await handleAdd?.(`${name}`.toUpperCase(), `${value}`) // The field name is always in uppercase, but the value is whatever the user enters in the input
reset()
} catch {}
},