/**
  * Start a new review round
  * @param $args array
  * @param $request PKPRequest
  * @return string Serialized JSON object
  */
 function saveNewReviewRound($args, &$request)
 {
     // Retrieve the authorized monograph.
     $monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);
     // Form handling.
     import('controllers.modals.editorDecision.form.NewReviewRoundForm');
     $newReviewRoundForm = new NewReviewRoundForm($monograph);
     $newReviewRoundForm->readInputData();
     if ($newReviewRoundForm->validate()) {
         $round = $newReviewRoundForm->execute($args, $request);
         // FIXME: Sending scripts through JSON is evil. This script
         // should (and can) be moved to the client side, #see 6357.
         // When this is done then we can also refactor this method
         // to work with _saveEditorDecision().
         // Generate the new review round tab script.
         $router =& $request->getRouter();
         $dispatcher =& $router->getDispatcher();
         $newRoundUrl = $dispatcher->url($request, ROUTE_PAGE, null, 'workflow', 'review', array($monograph->getId(), $round));
         $templateMgr =& TemplateManager::getManager();
         $templateMgr->assign('newRoundUrl', $newRoundUrl);
         $templateMgr->assign('round', $round);
         $reviewRoundTabScript = $templateMgr->fetch('controllers/modals/editorDecision/form/reviewRoundTab.tpl');
         // Create a JSON message with the script.
         $additionalAttributes = array('script' => $reviewRoundTabScript);
         $json = new JSON(true, null, true, null, $additionalAttributes);
     } else {
         $json = new JSON(false);
     }
     return $json->getString();
 }
 /**
  * Start a new review round
  * @param $args array
  * @param $request PKPRequest
  * @return string Serialized JSON object
  */
 function saveNewReviewRound($args, &$request)
 {
     // Retrieve the authorized monograph.
     $monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);
     Locale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON));
     // Form handling
     import('controllers.modals.editorDecision.form.NewReviewRoundForm');
     $newReviewRoundForm = new NewReviewRoundForm($monograph);
     $newReviewRoundForm->readInputData();
     if ($newReviewRoundForm->validate()) {
         $round = $newReviewRoundForm->execute($args, $request);
         $additionalAttributes = array('script' => $newReviewRoundForm->getNewTab($request, $round));
         $json = new JSON('true', null, 'true', null, $additionalAttributes);
     } else {
         $json = new JSON('false');
     }
     return $json->getString();
 }