Adjust to new framework
[misc/hallinta-metro] / ordersatz_pos.php
index 8bb8cd1..a131d0f 100644 (file)
@@ -19,8 +19,8 @@ if (substr($_SERVER["SCRIPT_FILENAME"],-10) == '/index.php' &&
   $done = is_done($_GET['id']);
 }
 
-if (!$done)
-$jscode[] = <<<EOC
+if (!$done) {
+  $jscode = <<<EOC
 grid_column_edit[1] = {
     default_menu: false,
     width: '9em',
@@ -99,6 +99,8 @@ function import_articles()
 }
 
 EOC;
+  $javascript->add($jscode);
+}
 
 $buttons = <<<EOC
 <p style="margin-top: 0px; margin-bottom: 4px; text-align: center;">