Files
edx-platform/lms/static/js/courseware/certificates_api.js
Will Daly 659535365d Update error messaging for progress page self-gen certs
Clean up docstrings for gen cert POST.
2015-03-23 09:10:39 -04:00

22 lines
656 B
JavaScript

$(document).ready(function() {
'use strict';
$("#btn_generate_cert").click(function(e){
e.preventDefault();
var post_url = $("#btn_generate_cert").data("endpoint");
$('#btn_generate_cert').prop("disabled", true);
$.ajax({
type: "POST",
url: post_url,
dataType: 'text',
success: function () {
location.reload();
},
error: function(jqXHR, textStatus, errorThrown) {
$('#errors-info').html(jqXHR.responseText);
$('#btn_generate_cert').prop("disabled", false);
}
});
});
});