added click through sanity check to registration token rotation, closes #698
parent
9e1bd8d8c1
commit
841e4b4d68
|
@ -275,20 +275,22 @@ var ClientView = Backbone.View.extend({
|
||||||
$('#modalAlert .modal-body').html(_self.registrationTokenTemplate(savedModel));
|
$('#modalAlert .modal-body').html(_self.registrationTokenTemplate(savedModel));
|
||||||
|
|
||||||
$('#modalAlert .modal-body #rotate-token').click(function(e) {
|
$('#modalAlert .modal-body #rotate-token').click(function(e) {
|
||||||
token.save(null, {success: function() {
|
if (confirm("Are you sure you want to rotate this client's registration token?")) {
|
||||||
console.log('token:' + token.get('value'));
|
token.save(null, {success: function() {
|
||||||
$('#modalAlert .modal-body #registrationToken').val(token.get('value'));
|
console.log('token:' + token.get('value'));
|
||||||
},
|
$('#modalAlert .modal-body #registrationToken').val(token.get('value'));
|
||||||
error: function() {
|
},
|
||||||
$('#modalAlert .modal-body').html('There was a problem rotating the registration access token for this client.');
|
error: function() {
|
||||||
|
$('#modalAlert .modal-body').html('There was a problem rotating the registration access token for this client.');
|
||||||
$('#modalAlert').modal({
|
|
||||||
'backdrop': 'static',
|
$('#modalAlert').modal({
|
||||||
'keyboard': true,
|
'backdrop': 'static',
|
||||||
'show': true
|
'keyboard': true,
|
||||||
});
|
'show': true
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#modalAlert').modal({
|
$('#modalAlert').modal({
|
||||||
|
|
Loading…
Reference in New Issue