diff --git a/pagure/templates/settings.html b/pagure/templates/settings.html
index 268dc93..f7fc247 100644
--- a/pagure/templates/settings.html
+++ b/pagure/templates/settings.html
@@ -79,6 +79,11 @@
Regenerate Repos
+ {% if repo.user.user == g.fas_user.username or pagure_admin %}
+ Block Users
+ {% endif %}
+
{% if config.get('ENABLE_GIVE_PROJECTS', True)
and (repo.user.user == g.fas_user.username or pagure_admin)
and not repo.is_fork %}
@@ -1034,6 +1039,10 @@
+
+ {% include 'settings_block_users.html' %}
+
+
{% if config.get('ENABLE_GIVE_PROJECTS', True)
and (repo.user.user == g.fas_user.username or pagure_admin)
and not repo.is_fork %}
@@ -1418,6 +1427,39 @@ $('#user').selectize({
}
});
{% endif %}
+
+$('.ajaxed').click(function(e) {
+ _form = $(this).closest('form')
+ $.ajax({
+ url: _form.prop('action') ,
+ type: 'POST',
+ data: _form.serialize(),
+ dataType: 'json',
+ success: function(res) {
+ console.log(res);
+ if ( res.message ) {
+ var _html = ''
+ + '
'
+ + '
'
+ + '
'
+ + ' ' + res.message
+ + '
'
+ + '
'
+ + '
';
+ $('.bodycontent').prepend(_html)
+ }
+ },
+ error: function(res) {
+ console.log(res);
+ alert('Request failed');
+ }
+ });
+ return false;
+});
+