Skip to content

Commit

Permalink
N°6663 - Request template fields do not apply portal silos
Browse files Browse the repository at this point in the history
  • Loading branch information
accognet committed Nov 22, 2024
1 parent 19eae91 commit a86e3d4
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
namespace Combodo\iTop\Renderer\Bootstrap\FieldRenderer;

use ApplicationContext;
use Combodo\iTop\Portal\Helper\ScopeValidatorHelper;
use Combodo\iTop\Renderer\RenderingOutput;
use ContextTag;
use CoreException;
Expand All @@ -29,6 +30,7 @@
use Exception;
use IssueLog;
use MetaModel;
use ModuleDesign;
use utils;

/**
Expand Down Expand Up @@ -104,7 +106,12 @@ public function Render()
$oOutput->AddHtml('<select id="' . $this->oField->GetGlobalId() . '" name="' . $this->oField->GetId() . '" class="form-control">');
$oOutput->AddHtml('<option value="">')->AddHtml(Dict::S('UI:SelectOne'), false)->AddHtml('</option>');
// - Retrieving choices
$oChoicesSet = new DBObjectSet($oSearch);
$sPortalId =$_ENV['PORTAL_ID'];
$oModuleDesign = new ModuleDesign($_ENV['PORTAL_ID']);
$oScopeValidatorHelper = new ScopeValidatorHelper( $oModuleDesign, $sPortalId);
$oScopeValidatorHelper->AddScopeToQuery($oSearch, $oSearch->GetClass());

$oChoicesSet = new DBObjectSet($oSearch);
$oChoicesSet->OptimizeColumnLoad(array($oSearch->GetClassAlias() => array('friendlyname')));
while ($oChoice = $oChoicesSet->Fetch())
{
Expand Down

0 comments on commit a86e3d4

Please sign in to comment.