*Fix bug #17639
This commit is contained in:
@@ -24,8 +24,8 @@ function setRole(account, roleID)
|
||||
function addItem(obj)
|
||||
{
|
||||
var item = $('#addItem').html().replace(/%i%/g, itemIndex);
|
||||
$(obj).closest('tr').after('<tr class="addedItem">' + item + '</tr>');
|
||||
var $accounts = $('#hours' + i).closest('tr').find('select:first')
|
||||
$('<tr class="addedItem">' + item + '</tr>').insertAfter($(obj).closest('tr'));
|
||||
var $accounts = $('#hours' + itemIndex).closest('tr').find('select:first')
|
||||
|
||||
if($accounts.attr('data-pickertype') != 'remote')
|
||||
{
|
||||
|
||||
@@ -7,15 +7,15 @@
|
||||
*/
|
||||
function addItem(obj)
|
||||
{
|
||||
var item = $('#addItem').html().replace(/%i%/g, i);
|
||||
var item = $('#addItem').html().replace(/%i%/g, itemIndex);
|
||||
$(obj).closest('tr').after('<tr class="addedItem">' + item + '</tr>');
|
||||
var newItem = $('#names' + i).closest('tr');
|
||||
var newItem = $('#names' + itemIndex).closest('tr');
|
||||
newItem.find('.form-date').datepicker();
|
||||
$("#output" + i).chosen();
|
||||
$("#output" + itemIndex).chosen();
|
||||
$("#PM_i__chosen").remove();
|
||||
$("#PM" + i).chosen();
|
||||
$("#PM" + itemIndex).chosen();
|
||||
$("#output_i__chosen").remove();
|
||||
i ++;
|
||||
itemIndex ++;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<?php js::set('i', $i);?>
|
||||
<?php js::set('itemIndex', $i);?>
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
<?php $i = '%i%';?>
|
||||
<table class='hidden'>
|
||||
<tr id='addItem' class='hidden'>
|
||||
<td><?php echo html::select("accounts[]", $users, '', "class='form-control' onchange='setRole(this.value, $i)'");?></td>
|
||||
<td><?php echo html::select("accounts[$i]", $users, '', "class='form-control' onchange='setRole(this.value, $i)'");?></td>
|
||||
<td><?php echo html::input("roles[$i]", '', "class='form-control'");?></td>
|
||||
<td><?php echo html::input("days[$i]", $project->days, "class='form-control'");?></td>
|
||||
<td><?php echo html::input("hours[$i]", $config->execution->defaultWorkhours, "class='form-control'");?></td>
|
||||
|
||||
Reference in New Issue
Block a user