Added "Update from Blender ID" button
Added this button in the /u/ user/embed view, so that admins can easily force a re-check from Blender ID without requiring the user themselves to perform any actions.
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
| none
|
||||
| {% endif %}
|
||||
|
||||
a.btn.btn-default(href="javascript:update_from_bid()") Update from Blender ID
|
||||
a.btn.btn-default(href="javascript:$('#user-edit-container').html('')") Cancel
|
||||
|
||||
input#submit_edit_user.btn.btn-default(
|
||||
@@ -103,4 +104,16 @@ script(type="text/javascript").
|
||||
|
||||
new Clipboard('.copy-to-clipboard');
|
||||
|
||||
function update_from_bid() {
|
||||
var url = '{{ url_for("blender_cloud.subscription.update_subscription_for", user_id=user.user_id) }}';
|
||||
$.post(url)
|
||||
.done(function(data) {
|
||||
toastr.info('User updated from Blender ID');
|
||||
displayUser('{{ user.user_id }}');
|
||||
})
|
||||
.fail(function(data) {
|
||||
toastr.error(data.responseText);
|
||||
});
|
||||
}
|
||||
|
||||
| {% endblock %}
|
||||
|
Reference in New Issue
Block a user