Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
4e889822
Commit
4e889822
authored
Feb 26, 2017
by
cilefen
Browse files
Issue
#2850554
by scott_euser, Sam152, yoroy: Remain on the workflow edit page when saving
parent
21f8a650
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/modules/workflows/src/Form/WorkflowEditForm.php
View file @
4e889822
...
...
@@ -191,7 +191,6 @@ public function save(array $form, FormStateInterface $form_state) {
$workflow
=
$this
->
entity
;
$workflow
->
save
();
drupal_set_message
(
$this
->
t
(
'Saved the %label Workflow.'
,
[
'%label'
=>
$workflow
->
label
()]));
$form_state
->
setRedirectUrl
(
$workflow
->
toUrl
(
'collection'
));
}
/**
...
...
core/modules/workflows/tests/src/Functional/WorkflowUiTest.php
View file @
4e889822
...
...
@@ -176,9 +176,8 @@ public function testWorkflowCreation() {
$workflow
=
$workflow_storage
->
loadUnchanged
(
'test'
);
$this
->
assertEquals
(
'draft'
,
$workflow
->
getInitialState
()
->
id
());
// This will take us to the list of workflows, so we need to edit the
// workflow again.
$this
->
clickLink
(
'Edit'
);
// Verify that we are still on the workflow edit page.
$this
->
assertSession
()
->
addressEquals
(
'admin/config/workflow/workflows/manage/test'
);
// Ensure that weight changes the transition ordering.
$this
->
assertEquals
([
'publish'
,
'create_new_draft'
],
array_keys
(
$workflow
->
getTransitions
()));
...
...
@@ -187,9 +186,8 @@ public function testWorkflowCreation() {
$workflow
=
$workflow_storage
->
loadUnchanged
(
'test'
);
$this
->
assertEquals
([
'create_new_draft'
,
'publish'
],
array_keys
(
$workflow
->
getTransitions
()));
// This will take us to the list of workflows, so we need to edit the
// workflow again.
$this
->
clickLink
(
'Edit'
);
// Verify that we are still on the workflow edit page.
$this
->
assertSession
()
->
addressEquals
(
'admin/config/workflow/workflows/manage/test'
);
// Ensure that a delete link for the published state exists before deleting
// the draft state.
...
...
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