Commit 5f4b1127d2cffb583635961413843ca69332b6fb
1 parent
9ee46a76
Fixed Copy/Move template for Workflow actions
Showing
2 changed files
with
31 additions
and
4 deletions
plugins/ktcore/KTWorkflowTriggers.inc.php
| @@ -33,7 +33,7 @@ | @@ -33,7 +33,7 @@ | ||
| 33 | * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices | 33 | * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices |
| 34 | * must display the words "Powered by KnowledgeTree" and retain the original | 34 | * must display the words "Powered by KnowledgeTree" and retain the original |
| 35 | * copyright notice. | 35 | * copyright notice. |
| 36 | - * Contributor( s): ______________________________________ | 36 | + * Contributor( s): thePanz (thepanz@gmail.com) |
| 37 | * | 37 | * |
| 38 | */ | 38 | */ |
| 39 | 39 | ||
| @@ -475,9 +475,9 @@ class BaseCopyActionTrigger extends KTWorkflowTrigger { | @@ -475,9 +475,9 @@ class BaseCopyActionTrigger extends KTWorkflowTrigger { | ||
| 475 | $oToFolder = Folder::get($iFolderId); | 475 | $oToFolder = Folder::get($iFolderId); |
| 476 | if (PEAR::isError($oFolder)) { | 476 | if (PEAR::isError($oFolder)) { |
| 477 | if ($this->isCopy) | 477 | if ($this->isCopy) |
| 478 | - return PEAR::raiseError(_kt('The folder to which this document should be copied does not exist. Cancelling the transition - please contact a system administrator.')); | 478 | + return PEAR::raiseError(_kt('The folder to which this document should be copied does not exists. Cancelling the transition - please contact a system administrator.')); |
| 479 | else | 479 | else |
| 480 | - return PEAR::raiseError(_kt('The folder to which this document should be moved does not exist. Cancelling the transition - please contact a system administrator.')); | 480 | + return PEAR::raiseError(_kt('The folder to which this document should be moved does not exists. Cancelling the transition - please contact a system administrator.')); |
| 481 | } | 481 | } |
| 482 | 482 | ||
| 483 | if ($this->isCopy) | 483 | if ($this->isCopy) |
| @@ -488,8 +488,12 @@ class BaseCopyActionTrigger extends KTWorkflowTrigger { | @@ -488,8 +488,12 @@ class BaseCopyActionTrigger extends KTWorkflowTrigger { | ||
| 488 | 488 | ||
| 489 | function displayConfiguration($args) { | 489 | function displayConfiguration($args) { |
| 490 | $oTemplating =& KTTemplating::getSingleton(); | 490 | $oTemplating =& KTTemplating::getSingleton(); |
| 491 | - $oTemplate = $oTemplating->loadTemplate('ktcore/workflowtriggers/moveaction'); | ||
| 492 | 491 | ||
| 492 | + if ($this->isCopy) | ||
| 493 | + $oTemplate = $oTemplating->loadTemplate('ktcore/workflowtriggers/copyaction'); | ||
| 494 | + else | ||
| 495 | + $oTemplate = $oTemplating->loadTemplate('ktcore/workflowtriggers/moveaction'); | ||
| 496 | + | ||
| 493 | require_once(KT_LIB_DIR . '/browse/DocumentCollection.inc.php'); | 497 | require_once(KT_LIB_DIR . '/browse/DocumentCollection.inc.php'); |
| 494 | require_once(KT_LIB_DIR . '/browse/columnregistry.inc.php'); | 498 | require_once(KT_LIB_DIR . '/browse/columnregistry.inc.php'); |
| 495 | 499 |
templates/ktcore/workflowtriggers/copyaction.smarty
0 → 100644
| 1 | +<h2>{i18n}Copy Action for Transition{/i18n}</h2> | ||
| 2 | + | ||
| 3 | +<form action="{$smarty.server.PHP_SELF}" method="POST"> | ||
| 4 | +<fieldset> | ||
| 5 | + <legend>{i18n}Copy{/i18n}</legend> | ||
| 6 | + | ||
| 7 | + | ||
| 8 | +{foreach from=$args item=val key=name} | ||
| 9 | +<input type="hidden" name="{$name}" value="{$val}" /> | ||
| 10 | +{/foreach} | ||
| 11 | + | ||
| 12 | +<p class="descriptiveText">{i18n}Specify the folder to which the document must be copied to.{/i18n}</p> | ||
| 13 | + | ||
| 14 | +{$breadcrumbs} | ||
| 15 | + | ||
| 16 | +{$collection->render()} | ||
| 17 | + | ||
| 18 | +<div class="form_action"> | ||
| 19 | + <input type="submit" value="{i18n}Save Trigger{/i18n}" /> | ||
| 20 | + {* FIXME how do I cancel again? *} | ||
| 21 | +</div> | ||
| 22 | +</fieldset> | ||
| 23 | +</form> |