Skip to content

Commit

Permalink
Fixed issue #12463: "Quick add.." replace function does not work anymore
Browse files Browse the repository at this point in the history
Dev: qid is not used here, but fix it
  • Loading branch information
Shnoulle committed Jun 9, 2017
1 parent fb322d3 commit 74eb67f
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions scripts/admin/subquestions.js
Expand Up @@ -202,21 +202,22 @@ function addinputQuickEdit($currentTable, language, first, scale_id, codes)

// We convert them to json for the request
$codes = JSON.stringify(codes);

//We build the datas for the request
datas = 'surveyid='+$elDatas.data('surveyid');
datas += '&gid='+$elDatas.data('gid');
datas += '&qid='+qid;
datas += '&codes='+$codes;
datas += '&scale_id='+scale_id;
datas += '&type=subquestion';
datas += '&position=';
datas += '&first='+first;
datas += '&language='+language+'';
datas = {
'surveyid' : $elDatas.data('surveyid'),
'gid' : $elDatas.data('gid'),
'qid' : $elDatas.data('qid'),
'codes' : $codes,
'scale_id' : scale_id, // In $elDatas.data('scale-id') ?
'type' : 'subquestion',
'position' : null,
'first' : first,
'language' : language,
}

// We get the HTML of the new row to insert
$.ajax({
type: "GET",
type: "GET", // We don't update DB, no need post
url: $url,
data: datas,
success: function(htmlrow) {
Expand Down

0 comments on commit 74eb67f

Please sign in to comment.