static function onBefore($fn, $id) { self::$SET = SettingsEditor::access($id); if (!self::$SET) { return false; } }
<?php namespace qg; ?> <div> <?php $name = $_GET['settings']; $SET = G()->SET->has($name) ? G()->SET[$name] : (G()->SET['m']->has($name) ? G()->SET['m'][$name] : false); if (!$SET) { echo 'nix</div>'; return; } ?> <h1>Einstellungen für <?php echo $name; ?> </h1> <div class="be_contentTextBox"> <?php $form = new SettingsEditor($SET); echo $form->show(); ?> </div> </div><?php
<?php namespace qg ?> <script src="<?=sysURL?>core/js/SettingsEditor.js"></script> <?php $Editor = new SettingsEditor($Cont->SET); echo $Editor->show(); ?> <script> $('.<?=$Editor->id?>').on('SettingsEditorChange', function(e,vs) { $fn('Page::reload')(<?=$Cont?>).run(); }); </script>