function initializeSettings() {
    var documentDd = $("#DocumentSelectList");
    var classificationDd = $("#ClassificationSelectList");
    var loading = $(".fa-spinner").hide();

    $(document).ajaxStart(function () {
        loading.show();
        documentDd.prop("disabled", true);
        classificationDd.prop("disabled", true);
    }).ajaxStop(function () {
        loading.hide();
        documentDd.prop("disabled", false);
        classificationDd.prop("disabled", false);
    });
}

function ChangeDocument(val) {
    var url = $("#SaveSettingsUrl").val();
    $.ajax({
        url: url,
        type: "post",
        data: {
            dropDownName: $("#DefaultDocumentTypeSetting").val(),
            selectedValue: val
        },
        success: function () {
            toastr.success($("#DocumentSettingsDropDownAjaxSuccessLoc").val());
        },
        error: function () {
            toastr.warning($("#DocumentSettingsDropDownAjaxFailLoc").val());
        }
    });
}

function ChangeClassification(val) {
    var url = $("#SaveSettingsUrl").val();

    $.ajax({
        url: url,
        type: "post",
        data: {
            dropDownName: $("#DefaultClassificationSetting").val(),
            selectedValue: val
        },
        success: function () {
            toastr.success($("#DocumentSettingsDropDownAjaxSuccessLoc").val());
        },
        error: function () {
            toastr.warning($("#DocumentSettingsDropDownAjaxFailLoc").val());
        }
    });
}