Commit 2fe2fcde0dad6b40ea86dba46c3bfab9657f1ae5
1 parent
bee6c3ca
clean up transition & state editing.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5950 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
5 additions
and
5 deletions
plugins/ktcore/admin/workflowsv2.php
| @@ -660,7 +660,7 @@ class KTWorkflowAdminV2 extends KTAdminDispatcher { | @@ -660,7 +660,7 @@ class KTWorkflowAdminV2 extends KTAdminDispatcher { | ||
| 660 | } | 660 | } |
| 661 | 661 | ||
| 662 | function do_savestate() { | 662 | function do_savestate() { |
| 663 | - $oForm = $this->form_editstate(); | 663 | + $oForm = $this->form_editstate($this->oState); |
| 664 | $res = $oForm->validate(); | 664 | $res = $oForm->validate(); |
| 665 | $data = $res['results']; | 665 | $data = $res['results']; |
| 666 | $errors = $res['errors']; | 666 | $errors = $res['errors']; |
| @@ -691,7 +691,7 @@ class KTWorkflowAdminV2 extends KTAdminDispatcher { | @@ -691,7 +691,7 @@ class KTWorkflowAdminV2 extends KTAdminDispatcher { | ||
| 691 | $oForm->handleError(sprintf(_kt("Unable to update state: %s"), $res->getMessage())); | 691 | $oForm->handleError(sprintf(_kt("Unable to update state: %s"), $res->getMessage())); |
| 692 | } | 692 | } |
| 693 | 693 | ||
| 694 | - $this->successRedirectTo('editstate', _kt("State updated.")); | 694 | + $this->successRedirectTo('basic', _kt("State updated.")); |
| 695 | } | 695 | } |
| 696 | 696 | ||
| 697 | function form_edittransition($oTransition) { | 697 | function form_edittransition($oTransition) { |
| @@ -747,7 +747,7 @@ class KTWorkflowAdminV2 extends KTAdminDispatcher { | @@ -747,7 +747,7 @@ class KTWorkflowAdminV2 extends KTAdminDispatcher { | ||
| 747 | } | 747 | } |
| 748 | 748 | ||
| 749 | function do_savetransition() { | 749 | function do_savetransition() { |
| 750 | - $oForm = $this->form_edittransition(); | 750 | + $oForm = $this->form_edittransition($this->oTransition); |
| 751 | $res = $oForm->validate(); | 751 | $res = $oForm->validate(); |
| 752 | $data = $res['results']; | 752 | $data = $res['results']; |
| 753 | $errors = $res['errors']; | 753 | $errors = $res['errors']; |
| @@ -760,7 +760,7 @@ class KTWorkflowAdminV2 extends KTAdminDispatcher { | @@ -760,7 +760,7 @@ class KTWorkflowAdminV2 extends KTAdminDispatcher { | ||
| 760 | 760 | ||
| 761 | // otherwise we're looking for something different if there's a conflict. | 761 | // otherwise we're looking for something different if there's a conflict. |
| 762 | 762 | ||
| 763 | - if (KTWorkflowTransitions::nameExists($data['name'], $this->oWorkflow)) { | 763 | + if (KTWorkflowTransition::nameExists($data['name'], $this->oWorkflow)) { |
| 764 | $extra_errors['name'][] = _kt('There is already a transition with that name in this workflow.'); | 764 | $extra_errors['name'][] = _kt('There is already a transition with that name in this workflow.'); |
| 765 | } | 765 | } |
| 766 | 766 | ||
| @@ -778,7 +778,7 @@ class KTWorkflowAdminV2 extends KTAdminDispatcher { | @@ -778,7 +778,7 @@ class KTWorkflowAdminV2 extends KTAdminDispatcher { | ||
| 778 | $oForm->handleError(sprintf(_kt("Unable to update transition: %s"), $res->getMessage())); | 778 | $oForm->handleError(sprintf(_kt("Unable to update transition: %s"), $res->getMessage())); |
| 779 | } | 779 | } |
| 780 | 780 | ||
| 781 | - $this->successRedirectTo('transition', _kt("Transition updated.")); | 781 | + $this->successRedirectTo('basic', _kt("Transition updated.")); |
| 782 | } | 782 | } |
| 783 | 783 | ||
| 784 | // ----------------- Security --------------------- | 784 | // ----------------- Security --------------------- |