/// class PD.Manage.Services.DocumentTypeService

PD.Manage.Services.DocumentTypeService =
Class.extend({

    //===================================
    // PUBLIC METHODS
    //===================================

    deleteDocumentType: function (documentTypeId, success, error) {

        PD.ajax({
            type: "DELETE",
            url: Jade.Path.resolve("~/Manage/DocumentTypes/DeleteDocumentType"),
            data: {
                documentTypeId: documentTypeId,
                confirmed: true
            },
            success: success,
            error: error
        });

    },

    saveDocumentTypeForm: function (documentTypeFormId, layout, success, error) {
    
        PD.ajax({
            type: "POST",
            url: Jade.Path.resolve("~/FormDesign/Save"),
            data: {
                formId: documentTypeFormId,
                layout: JSON.stringify(layout)
            },
            success: success,
            error: error
        });

    }

});