added click through sanity check to registration token rotation, closes #698

pull/730/head
Justin Richer 2014-10-23 23:28:48 -04:00
parent 9e1bd8d8c1
commit 841e4b4d68
1 changed files with 16 additions and 14 deletions

View File

@ -275,6 +275,7 @@ var ClientView = Backbone.View.extend({
$('#modalAlert .modal-body').html(_self.registrationTokenTemplate(savedModel));
$('#modalAlert .modal-body #rotate-token').click(function(e) {
if (confirm("Are you sure you want to rotate this client's registration token?")) {
token.save(null, {success: function() {
console.log('token:' + token.get('value'));
$('#modalAlert .modal-body #registrationToken').val(token.get('value'));
@ -289,6 +290,7 @@ var ClientView = Backbone.View.extend({
});
}
});
}
});
$('#modalAlert').modal({