/**
  * Edit an existing press.
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function editContext($args, $request)
 {
     // Identify the press Id.
     $pressId = $request->getUserVar('rowId');
     // Form handling.
     $settingsForm = new PressSiteSettingsForm(!isset($pressId) || empty($pressId) ? null : $pressId);
     $settingsForm->initData();
     return new JSONMessage(true, $settingsForm->fetch($args, $request));
 }
 /**
  * Display form to create/edit a press.
  * @param $args array optional, if set the first parameter is the ID of the press to edit
  */
 function editPress($args = array())
 {
     $this->validate();
     $this->setupTemplate(true);
     import('classes.admin.form.PressSiteSettingsForm');
     if (checkPhpVersion('5.0.0')) {
         // WARNING: This form needs $this in constructor
         $settingsForm = new PressSiteSettingsForm(!isset($args) || empty($args) ? null : $args[0]);
     } else {
         $settingsForm =& new PressSiteSettingsForm(!isset($args) || empty($args) ? null : $args[0]);
     }
     if ($settingsForm->isLocaleResubmit()) {
         $settingsForm->readInputData();
     } else {
         $settingsForm->initData();
     }
     $settingsForm->display();
 }