Skip to content

Commit

Permalink
Fixed issue #16187: Cant Create Custom Survey ID (need proper error m…
Browse files Browse the repository at this point in the history
…essage) (#2725)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
  • Loading branch information
gabrieljenik and lapiudevgit committed Nov 21, 2022
1 parent 957788e commit 7b94315
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions application/helpers/admin/import_helper.php
Expand Up @@ -1013,6 +1013,9 @@ function XMLImportSurvey($sFullFilePath, $sXMLdata = null, $sNewSurveyName = nul
if ($newSurvey->sid) {
$iNewSID = $results['newsid'] = $newSurvey->sid;
$results['surveys']++;
if (!empty($iDesiredSurveyId) && $iNewSID != $iDesiredSurveyId) {
$results['importwarnings'][] = gT("The desired survey ID was already in use, therefore a random one was assigned.");
}
} else {
$results['error'] = CHtml::errorSummary($newSurvey, gT("Unable to import survey."));
return $results;
Expand Down
6 changes: 3 additions & 3 deletions application/views/admin/survey/subview/tabCopy_view.php
Expand Up @@ -43,10 +43,10 @@
<div class="">
<input type='number' step="1" min="1" max="999999" id='copysurveyid' size='82' name='copysurveyid' value='' class="form-control" />
</div>
<div class="">
<p class="form-control-static">
<div class="help-block">
<span class='annotation text-info'><?php echo gT("Optional"); ?> </span>
</p>
-
<?= gT("If the new survey ID is already used, a random one will be assigned."); ?> </span>
</div>
</div>
</div>
Expand Down

0 comments on commit 7b94315

Please sign in to comment.