function initializeTasksEdit() {
    $('.input-validation-error').parents('.form-group').addClass('has-error');
    $('.field-validation-error').addClass('text-danger');
}

function downloadAttachment(filename) {
    var form = $('<form id="exportForm" method="POST" style="display:none;"></form>');
    form.attr("action", "/Task/DownloadAttachment");
    var form_data = new FormData();

    var input = $("<input>").attr("name", "filename").val(filename);
    form.append(input);

    $("body").append(form);
    form.submit();
    $("#exportForm").remove();
}