Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SSHOC
sshoc-marketplace-frontend
Commits
7ff49822
Commit
7ff49822
authored
Mar 05, 2021
by
Stefan Probst
Browse files
fix: allow workflow submission when form page pristine
parent
1b47ea7f
Pipeline
#178358
passed with stage
in 5 minutes and 49 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/components/item/WorkflowCreateForm/WorkflowCreateForm.tsx
View file @
7ff49822
...
...
@@ -188,6 +188,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
>
{
pages
[
state
.
page
]
}
<
div
className
=
"flex items-center justify-end space-x-6"
>
<
pre
>
{
JSON
.
stringify
(
pristine
)
}
</
pre
>
<
Button
onPress
=
{
onCancel
}
variant
=
"link"
>
Cancel
</
Button
>
...
...
@@ -202,7 +203,8 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
form
.
change
(
'
draft
'
,
true
)
}
}
isDisabled
=
{
pristine
||
invalid
||
submitting
||
create
.
isLoading
/* FIXME: handle `pristine` for multi-step form || */
invalid
||
submitting
||
create
.
isLoading
}
variant
=
"link"
>
...
...
@@ -214,7 +216,8 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
form
.
change
(
'
draft
'
,
undefined
)
}
}
isDisabled
=
{
pristine
||
invalid
||
submitting
||
create
.
isLoading
/* FIXME: pristine || */
invalid
||
submitting
||
create
.
isLoading
}
>
{
isAllowedToPublish
?
'
Publish
'
:
'
Submit
'
}
...
...
src/components/item/WorkflowEditForm/WorkflowEditForm.tsx
View file @
7ff49822
...
...
@@ -205,7 +205,8 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
form
.
change
(
'
draft
'
,
true
)
}
}
isDisabled
=
{
pristine
||
invalid
||
submitting
||
create
.
isLoading
/* FIXME: handle `pristine` for multi-step form || */
invalid
||
submitting
||
create
.
isLoading
}
variant
=
"link"
>
...
...
@@ -217,7 +218,8 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
form
.
change
(
'
draft
'
,
undefined
)
}
}
isDisabled
=
{
pristine
||
invalid
||
submitting
||
create
.
isLoading
/* FIXME: pristine || */
invalid
||
submitting
||
create
.
isLoading
}
>
{
isAllowedToPublish
?
'
Publish
'
:
'
Submit
'
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment