 dataType: "json",
            type: "POST",
            success: function (resp) {
                if (resp.state) {
                    window.location.reload();
                } else {
                    var error = resp.error;
                    for (var name in error) {
                        $("#id-" + name +"-error").html(error[name][0]);
                    }
                }
            },
            error: function (err) {
                if (err.statusText !== 'abort') {
                   