Skip to content

Commit

Permalink
Bugfix - Chart Configuration
Browse files Browse the repository at this point in the history
- remove Bug DCA function jsonInputCallback that not get the current Saved Version from DB
- code clean
  • Loading branch information
Bahtiyar Özer committed Oct 23, 2024
1 parent 5027036 commit b5e65b7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,17 @@
use Contao\CoreBundle\Framework\ContaoFramework;
use Contao\CoreBundle\Routing\ScopeMatcher;
use Contao\CoreBundle\DependencyInjection\Attribute\AsFrontendModule;
use Contao\Date;
use Contao\FrontendUser;
use Contao\ModuleModel;
use Contao\PageModel;
use Contao\StringUtil;
use Contao\Template;
use Doctrine\DBAL\Connection;
use Newhorizondesign\ContaoChartjsDiagramms\Model\NhdChartjsModel;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\Security\Core\Security;
use Symfony\Contracts\Translation\TranslatorInterface;
use Twig\Environment as TwigEnvironment;



#[AsFrontendModule(category: 'ChartJS')]
class ListenChartjsModulesController extends AbstractFrontendModuleController
{
Expand Down
14 changes: 0 additions & 14 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,6 @@ public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder(self::ROOT_KEY);

$treeBuilder->getRootNode()
->children()
->arrayNode('foo')
->addDefaultsIfNotSet()
->children()
->scalarNode('bar')
->cannotBeEmpty()
->defaultValue('***')
->end()
->end()
->end() // end foo
->end()
;

return $treeBuilder;
}
}
2 changes: 1 addition & 1 deletion src/Resources/contao/dca/tl_nhd_chartjs.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public function jsonInputLabelsCallback($varValue, DataContainer $dc)

public function jsonInputCallback($varValue, DataContainer $dc)
{
if($dc->activeRecord->chartType == $varValue) {
if(!empty($varValue)) {
return $varValue;
} else {
switch($dc->activeRecord->chartType) {
Expand Down

0 comments on commit b5e65b7

Please sign in to comment.