<?php
$selectHtml  = "<tr class='assignTR hide'><th>";
$selectHtml .= $lang->todo->assignTo;
$selectHtml .= '</th>';
$selectHtml .= '<td>';
$selectHtml .= html::select('assignedTo', $members, '', "class='form-control'");
$selectHtml .= '</td></tr>';

js::set('feedbackID', !empty($feedback) ? $feedback->id : '');
?>
<script language='Javascript'>
$(document).ready(function()
{
    $("#navbar .nav li[data-id=browse]").addClass('active');
    $('#pri').closest('tr').after(<?php echo json_encode($selectHtml)?>);
    $('#assignedTo').chosen();

    $('#type').change(function()
    {
        $('.assignTR').toggle($(this).val() == 'feedback');
    })

    if(feedbackID)
    { 
        $('#type').attr('onchange', "loadList($('#type').val(), 0, $('#type').val(), feedbackID);")
        $('#type').val('feedback').change();
    }
})
</script>
