Skip to content

Commit

Permalink
fix: typo in comment for base form sumbitting
Browse files Browse the repository at this point in the history
  • Loading branch information
harshpatel-crest committed May 11, 2021
1 parent 2a29d2f commit d8634a1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ui/src/main/webapp/components/BaseFormView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ class BaseFormView extends PureComponent {
if (this.hook && typeof this.hook.onSave === 'function') {
const validationPass = this.hook.onSave(this.datadict);
if (!validationPass) {
this.props.handleFormSubmit(/* isSubmititng */ false, /* closeEntity */ false);
this.props.handleFormSubmit(/* isSubmitting */ false, /* closeEntity */ false);
return;
}
}
Expand All @@ -391,7 +391,7 @@ class BaseFormView extends PureComponent {
'name',
getFormattedMessage(2, [this.entities[index].label, this.datadict.name])
);
this.props.handleFormSubmit(/* isSubmititng */ false, /* closeEntity */ false);
this.props.handleFormSubmit(/* isSubmitting */ false, /* closeEntity */ false);
return;
}
}
Expand Down Expand Up @@ -428,7 +428,7 @@ class BaseFormView extends PureComponent {
}

if (error) {
this.props.handleFormSubmit(/* isSubmititng */ false, /* closeEntity */ false);
this.props.handleFormSubmit(/* isSubmitting */ false, /* closeEntity */ false);
} else if (
this.isOAuth &&
(this.isSingleOauth || (this.isAuthVal && this.datadict.auth_type === 'oauth'))
Expand Down Expand Up @@ -473,7 +473,7 @@ class BaseFormView extends PureComponent {
// Add error message if the user has close the authentication window without taking any action
this.setErrorMsg(ERROR_AUTH_PROCESS_TERMINATED_TRY_AGAIN);
this.props.handleFormSubmit(
/* isSubmititng */ false,
/* isSubmitting */ false,
/* closeEntity */ false
);
return false;
Expand All @@ -483,7 +483,7 @@ class BaseFormView extends PureComponent {
// Add timeout error message
this.setErrorMsg(ERROR_REQUEST_TIMEOUT_TRY_AGAIN);
this.props.handleFormSubmit(
/* isSubmititng */ false,
/* isSubmitting */ false,
/* closeEntity */ false
);
return false;
Expand All @@ -500,7 +500,7 @@ class BaseFormView extends PureComponent {
// Add timeout error message
this.setErrorMsg(ERROR_REQUEST_TIMEOUT_ACCESS_TOKEN_TRY_AGAIN);
this.props.handleFormSubmit(
/* isSubmititng */ false,
/* isSubmitting */ false,
/* closeEntity */ false
);
return false;
Expand All @@ -511,7 +511,7 @@ class BaseFormView extends PureComponent {
this.saveData();
} else {
this.props.handleFormSubmit(
/* isSubmititng */ false,
/* isSubmitting */ false,
/* closeEntity */ false
);
}
Expand Down Expand Up @@ -574,15 +574,15 @@ class BaseFormView extends PureComponent {
} else {
generateToast(`Created ${val.name}`, 'success');
}
this.props.handleFormSubmit(/* isSubmititng */ false, /* closeEntity */ true);
this.props.handleFormSubmit(/* isSubmitting */ false, /* closeEntity */ true);
})
.catch((err) => {
const errorSubmitMsg = parseErrorMsg(err);
this.setState({ errorMsg: errorSubmitMsg });
if (this.hook && typeof this.hook.onSaveFail === 'function') {
this.hook.onSaveFail();
}
this.props.handleFormSubmit(/* isSubmititng */ false, /* closeEntity */ false);
this.props.handleFormSubmit(/* isSubmitting */ false, /* closeEntity */ false);
});
};

Expand Down

0 comments on commit d8634a1

Please sign in to comment.