Prevent enter-submit on prompt steps

This commit is contained in:
Jake McDermott 2021-02-03 22:52:33 -05:00
parent 89646e7799
commit 14686e8b16
No known key found for this signature in database
GPG Key ID: 0E56ED990CDFCB4F
3 changed files with 15 additions and 3 deletions

View File

@ -84,7 +84,11 @@ function CredentialPasswordsStep({ launchConfig, i18n }) {
}
return (
<Form>
<Form
onSubmit={e => {
e.preventDefault();
}}
>
{showcredentialPasswordSsh && (
<PasswordField
id="launch-ssh-password"

View File

@ -22,7 +22,11 @@ const FieldHeader = styled.div`
function OtherPromptsStep({ launchConfig, i18n }) {
return (
<Form>
<Form
onSubmit={e => {
e.preventDefault();
}}
>
{launchConfig.ask_job_type_on_launch && <JobTypeField i18n={i18n} />}
{launchConfig.ask_limit_on_launch && (
<FormField

View File

@ -33,7 +33,11 @@ function SurveyStep({ surveyConfig, i18n }) {
float: NumberField,
};
return (
<Form>
<Form
onSubmit={e => {
e.preventDefault();
}}
>
{surveyConfig.spec.map(question => {
const Field = fieldTypes[question.type];
return (