diff --git a/plugins/ktcore/KTWorkflowTriggers.inc.php b/plugins/ktcore/KTWorkflowTriggers.inc.php
index 20b66ec..9edfda1 100644
--- a/plugins/ktcore/KTWorkflowTriggers.inc.php
+++ b/plugins/ktcore/KTWorkflowTriggers.inc.php
@@ -71,12 +71,18 @@ class PermissionGuardTrigger extends KTWorkflowTrigger {
$aPermissions = KTPermission::getList();
$aKeyPermissions = array();
foreach ($aPermissions as $oPermission) { $aKeyPermissions[$oPermission->getName()] = $oPermission; }
+
+ $current_perms = array();
+ foreach ($this->aConfig['perms'] as $sPermName) {
+ $current_perms[$sPermName] = true;
+ }
$oTemplating =& KTTemplating::getSingleton();
$oTemplate = $oTemplating->loadTemplate("ktcore/workflowtriggers/permissions");
$aTemplateData = array(
"context" => $this,
"perms" => $aKeyPermissions,
+ 'current_perms' => $current_perms,
'args' => $args,
);
return $oTemplate->render($aTemplateData);
@@ -369,7 +375,7 @@ class ConditionGuardTrigger extends KTWorkflowTrigger {
$aTemplateData = array(
"context" => $this,
"conditions" => $aKeyedConditions,
- "current_group" => KTUtil::arrayGet($this->aConfig, 'group_id'),
+ "current_condition" => KTUtil::arrayGet($this->aConfig, 'condition_id'),
'args' => $args,
);
return $oTemplate->render($aTemplateData);
diff --git a/templates/ktcore/workflowtriggers/condition.smarty b/templates/ktcore/workflowtriggers/condition.smarty
index d6c5e8e..2c074af 100644
--- a/templates/ktcore/workflowtriggers/condition.smarty
+++ b/templates/ktcore/workflowtriggers/condition.smarty
@@ -14,7 +14,7 @@
{* FIXME keep old selection *}
{foreach from=$conditions item=sConditionName key=iConditionId}
- {i18n}{$sConditionName}{/i18n}
+ {i18n}{$sConditionName}{/i18n}
{/foreach}
{i18n}Specify which permissions the user will require in order to perform this transition. Note that the user will be required to have all these permissions.{/i18n}
-{* FIXME keep old selection *} - -{foreach from=$perms item=oPerm} - {i18n}{$oPerm->getHumanName()}{/i18n}