Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
fix(policy): return twig output instead of direct echo
Browse files Browse the repository at this point in the history
Signed-Off-By: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry authored and DIOHz0r committed May 28, 2018
1 parent 8b1f991 commit ab77a9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions inc/policydeployapplication.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function showValueInput($value = '', $itemType = '', $itemId = 0) {
'value' => $itemId,
]);

$removeDropdown = Dropdown::showYesNo('value[remove_on_delete]', $removeOnDelete,
$removeDropdown = Dropdown::showYesNo('value[remove_on_delete]', $removeOnDelete,
-1, ['display' => false]);

$data = [
Expand All @@ -254,7 +254,7 @@ public function showValueInput($value = '', $itemType = '', $itemId = 0) {
];

$twig = plugin_flyvemdm_getTemplateEngine();
echo $twig->render('policy_deploy_app_form.html.twig', $data);
return $twig->render('policy_deploy_app_form.html.twig', $data);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions inc/policydeployfile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public function showValueInput($value = '', $itemType = '', $itemId = 0) {
'value' => $path->getID(),
]);

$removeDropdown = Dropdown::showYesNo('value[remove_on_delete]', $removeOnDelete,
$removeDropdown = Dropdown::showYesNo('value[remove_on_delete]', $removeOnDelete,
-1, ['display' => false]);

$data = [
Expand All @@ -311,7 +311,7 @@ public function showValueInput($value = '', $itemType = '', $itemId = 0) {
];

$twig = plugin_flyvemdm_getTemplateEngine();
echo $twig->render('policy_deploy_file_form.html.twig', $data);
return $twig->render('policy_deploy_file_form.html.twig', $data);
}

/**
Expand Down

0 comments on commit ab77a9e

Please sign in to comment.