diff --git a/openslides/participant/forms.py b/openslides/participant/forms.py index 13db3fc3a..409f8dd23 100644 --- a/openslides/participant/forms.py +++ b/openslides/participant/forms.py @@ -35,7 +35,7 @@ class UserNewForm(ModelForm, CssClassMixin): class Meta: model = User - exclude = ('username', 'password', 'is_staff', 'last_login', 'date_joined', 'user_permissions') + exclude = ('username', 'password', 'is_staff', 'is_superuser', 'last_login', 'date_joined', 'user_permissions') class UserEditForm(ModelForm, CssClassMixin): @@ -44,13 +44,13 @@ class UserEditForm(ModelForm, CssClassMixin): class Meta: model = User - exclude = ('password', 'is_staff', 'last_login', 'date_joined', 'user_permissions') + exclude = ('password', 'is_staff', 'is_superuser', 'last_login', 'date_joined', 'user_permissions') class UsernameForm(ModelForm, CssClassMixin): class Meta: model = User - exclude = ('first_name', 'last_name', 'email', 'is_active','is_superuser', 'groups', 'password', 'is_staff', 'last_login', 'date_joined', 'user_permissions') + exclude = ('first_name', 'last_name', 'email', 'is_active', 'is_superuser', 'groups', 'password', 'is_staff', 'last_login', 'date_joined', 'user_permissions') class ProfileForm(ModelForm, CssClassMixin): diff --git a/openslides/participant/static/images/icons/im-user.png b/openslides/participant/static/images/icons/im-user.png deleted file mode 100644 index 1d3adc250..000000000 Binary files a/openslides/participant/static/images/icons/im-user.png and /dev/null differ diff --git a/openslides/participant/static/images/icons/meeting-chair.png b/openslides/participant/static/images/icons/meeting-chair.png deleted file mode 100644 index 0198ba9dc..000000000 Binary files a/openslides/participant/static/images/icons/meeting-chair.png and /dev/null differ diff --git a/openslides/participant/static/javascript/participant.js b/openslides/participant/static/javascript/participant.js index 895456830..8d8b66ff5 100644 --- a/openslides/participant/static/javascript/participant.js +++ b/openslides/participant/static/javascript/participant.js @@ -17,23 +17,4 @@ $(function() { } }); }); - - $('.superuser_link').click(function(event) { - event.preventDefault(); - link = $(this); - $.ajax({ - type: 'GET', - url: link.attr('href'), - dataType: 'json', - success: function(data) { - if (data.superuser) { - newclass = 'superuser'; - } else { - newclass = 'normaluser'; - } - link.removeClass('superuser normaluser').addClass(newclass); - link.attr('href', data.link); - } - }); - }); }); \ No newline at end of file diff --git a/openslides/participant/static/styles/participant.css b/openslides/participant/static/styles/participant.css index 4698c52cf..ae2bb0c56 100644 --- a/openslides/participant/static/styles/participant.css +++ b/openslides/participant/static/styles/participant.css @@ -14,20 +14,3 @@ a.status_link.inactive span { height: 16px; display: inline-block; } - -a.superuser_link.superuser span { - background-image: url(../images/icons/meeting-chair.png); - background-repeat: no-repeat; - background-position: center; - width: 16px; - height: 16px; - display: inline-block; -} -a.superuser_link.normaluser span { - background-image: url(../images/icons/im-user.png); - background-repeat: no-repeat; - background-position: center; - width: 16px; - height: 16px; - display: inline-block; -} \ No newline at end of file diff --git a/openslides/participant/templates/participant/overview.html b/openslides/participant/templates/participant/overview.html index 1257e59b5..f80e145f9 100644 --- a/openslides/participant/templates/participant/overview.html +++ b/openslides/participant/templates/participant/overview.html @@ -91,11 +91,6 @@ title="{%trans 'Change status (active/inactive)' %}"> - - - {% endif %} diff --git a/openslides/participant/urls.py b/openslides/participant/urls.py index f24f99b4d..3d1b39e5d 100644 --- a/openslides/participant/urls.py +++ b/openslides/participant/urls.py @@ -51,18 +51,6 @@ urlpatterns = patterns('participant.views', name='user_inactive', ), - url(r'^(?P\d+)/superuser/$', - 'user_set_superuser', - {'superuser': True}, - name='user_superuser', - ), - - url(r'^(?P\d+)/normaluser/$', - 'user_set_superuser', - {'superuser': False}, - name='user_normaluser', - ), - url(r'^import$', 'user_import', name='user_import', diff --git a/openslides/participant/views.py b/openslides/participant/views.py index d9323173a..e6bb42077 100644 --- a/openslides/participant/views.py +++ b/openslides/participant/views.py @@ -187,25 +187,6 @@ def user_delete(request, user_id): gen_confirm_form(request, _('Do you really want to delete %s?') % user, reverse('user_delete', args=[user_id])) return redirect(reverse('user_overview')) -@permission_required('participant.can_manage_participant') -@template('confirm.html') -def user_set_superuser(request, user_id, superuser=True): - try: - user = User.objects.get(pk=user_id) - user.is_superuser = superuser - user.save() - except User.DoesNotExist: - messages.error(request, _('Participant %d does not exist.') % int(user_id)) - - if request.is_ajax(): - if superuser: - link = reverse('user_normaluser', args=[user.id]) - else: - link = reverse('user_superuser', args=[user.id]) - return ajax_request({'superuser': superuser, - 'link': link}) - return redirect(reverse('user_overview')) - @permission_required('participant.can_manage_participant') @template('confirm.html') def user_set_active(request, user_id, active=True):