* zin: modify setLineIndex function of thinktableinput.
This commit is contained in:
@@ -20,11 +20,12 @@ window.changeInput = function(e)
|
||||
*/
|
||||
function setLineIndex()
|
||||
{
|
||||
let index = 0;
|
||||
let index = 1;
|
||||
$('.rows-group').each(function()
|
||||
{
|
||||
$(this).find('[name^="fileds"]').attr('name', 'fileds[' + index + ']');
|
||||
$(this).find('[name^="result"]').attr('name', 'result[' + index + ']');
|
||||
const resultIndex = fieldsCount + index - 1;
|
||||
$(this).find('[id^="customFields"]').attr('name', 'customFields[' + index + ']');
|
||||
$(this).find('[id^="result"]').attr('name', 'result[' + resultIndex + ']');
|
||||
index ++;
|
||||
});
|
||||
$('.add-rows').toggleClass('disabled', index >= canAddRows);
|
||||
|
||||
Reference in New Issue
Block a user