@@ -51,12 +51,23 @@ const Eula = ({currentEula, currentUser, acceptEula}) => {
|
||||
|
||||
try {
|
||||
const {accepted_terms, ...otherFormValues} = formValues;
|
||||
|
||||
// Trim the values of the fields before submitting
|
||||
const trimmedFormValues = {
|
||||
first_name: otherFormValues.first_name.trim(),
|
||||
last_name: otherFormValues.last_name.trim(),
|
||||
business_name: otherFormValues.business_name.trim(),
|
||||
address: otherFormValues.address.trim(),
|
||||
phone_number: otherFormValues.phone_number.trim(),
|
||||
};
|
||||
|
||||
await insertEulaAcceptance({
|
||||
variables: {
|
||||
eulaAcceptance: {
|
||||
eulaid: eulaId,
|
||||
useremail,
|
||||
...otherFormValues,
|
||||
...trimmedFormValues,
|
||||
date_accepted: new Date(),
|
||||
}
|
||||
}
|
||||
@@ -101,7 +112,7 @@ const Eula = ({currentEula, currentUser, acceptEula}) => {
|
||||
>
|
||||
<Card type='inner' className='eula-markdown-card' onScroll={handleScroll} ref={markdownCardRef}>
|
||||
<div id='markdowndiv' className='eula-markdown-div'>
|
||||
<Markdown children={currentEula?.content?.replace(/\\n/g, '\n')}/>
|
||||
<Markdown children={currentEula?.content?.replace(/\\n|\\r|\\n\\r|\\r\\n/g, '\n')}/>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user