diff --git a/application/controllers/admin/tokens.php b/application/controllers/admin/tokens.php index 404c826e688..eb1bfa1d1d1 100644 --- a/application/controllers/admin/tokens.php +++ b/application/controllers/admin/tokens.php @@ -729,6 +729,10 @@ public function edit($iSurveyId, $iTokenId, $ajax = false) $aTokenData[$attr_name] = $request->getPost($attr_name); } + if (!empty($sOutput)) { + \ls\ajax\AjaxHelper::outputError($sOutput); + } + $token = Token::model($iSurveyId)->findByPk($iTokenId); $token->decrypt(); foreach ($aTokenData as $k => $v) { @@ -738,7 +742,7 @@ public function edit($iSurveyId, $iTokenId, $ajax = false) $result = $token->encryptSave(true); if ($result) { - \ls\ajax\AjaxHelper::outputSuccess($sOutput . gT('The survey participant was successfully updated.')); + \ls\ajax\AjaxHelper::outputSuccess(gT('The survey participant was successfully updated.')); } else { $errors = $token->getErrors(); $firstError = reset($errors); diff --git a/application/views/admin/token/tokenform.php b/application/views/admin/token/tokenform.php index fb51bc5fc4e..50cf94d6a98 100644 --- a/application/views/admin/token/tokenform.php +++ b/application/views/admin/token/tokenform.php @@ -24,9 +24,19 @@ } ?> +