post('/', function() use ($app) { $handler = new RecordHelper\Edit($app['Core']); $handler->propose_editing(); $template = 'prod/actions/edit_default.twig'; $twig = new \supertwig(); $twig->addFilter(array('sbas_names' => 'phrasea::sbas_names')); return $twig->render($template, array('edit' => $handler, 'message' => '')); } ); $controllers->post('/apply/', function() use ($app) { $request = $app['request']; $editing = new RecordHelper\Edit($app['Core']); $editing->execute($request); $template = 'prod/actions/edit_default.twig'; $twig = new \supertwig(); $twig->addFilter(array('sbas_names' => 'phrasea::sbas_names')); return $twig->render($template, array('edit' => $editing, 'message' => '')); } ); return $controllers; } }