setupTemplate($request); import('classes.user.form.NotificationSettingsForm'); $notificationsForm = new NotificationSettingsForm($request->getUser()); $notificationsForm->initData($request); return new JSONMessage(true, $notificationsForm->fetch($request)); } /** * Validate and save changes to user's notifications info. * @param $args array * @param $request PKPRequest */ function saveNotifications($args, $request) { $this->setupTemplate($request); import('classes.user.form.NotificationSettingsForm'); $notificationsForm = new NotificationSettingsForm($request->getUser()); $notificationsForm->readInputData(); if ($notificationsForm->validate()) { $notificationsForm->execute($request); return new JSONMessage(true); } return new JSONMessage(false, $notificationsForm->fetch($request)); } } ?>