diff --git a/application/controllers/admin/tokens.php b/application/controllers/admin/tokens.php index 0a814d435e9..70bb10509d3 100644 --- a/application/controllers/admin/tokens.php +++ b/application/controllers/admin/tokens.php @@ -833,6 +833,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); foreach ($aTokenData as $k => $v) { $token->$k = $v; @@ -841,7 +845,7 @@ public function edit($iSurveyId, $iTokenId, $ajax = false) $result = $token->save(); 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 251ddf56858..72be7d23f94 100644 --- a/application/views/admin/token/tokenform.php +++ b/application/views/admin/token/tokenform.php @@ -24,9 +24,20 @@ } ?> +