window.addProject = function(e)
{
    if($(e.target).prop('checked'))
    {
        $('#projectName').removeClass('hidden')
        $('#projectPicker').addClass('hidden')
        $('.project-label').text(newProject);
    }
    else
    {
        $('#projectName').addClass('hidden')
        $('#projectPicker').removeClass('hidden')
        $('.project-label').text(choseProject);
    }
}

window.removeLine = function(e)
{
    if($('.executions').length == 1) return;
    $(e.target).closest('.form-row').remove();
}

window.changeTeam = function()
{
    const teamID = $('[name="team"]').val();
    const link = $.createLink('pi', 'initexecution', `piID=${piID}&teamID=${teamID}`);

    loadPartial(link, '#executions');
}
