diff --git a/django_ace/widgets.py b/django_ace/widgets.py index ec4df402..659ec759 100644 --- a/django_ace/widgets.py +++ b/django_ace/widgets.py @@ -66,7 +66,7 @@ def render(self, name, value, attrs=None, renderer=None): if self.toolbar: toolbar = ( '
" ).format(self.width) html = toolbar + html diff --git a/judge/views/organization.py b/judge/views/organization.py index 54d6adbb..0a3fc316 100644 --- a/judge/views/organization.py +++ b/judge/views/organization.py @@ -671,21 +671,13 @@ class OrganizationRequestBaseView( LoginRequiredMixin, SingleObjectTemplateResponseMixin, SingleObjectMixin, + AdminOrganizationMixin, ): model = Organization slug_field = "key" slug_url_kwarg = "key" tab = None - def get_object(self, queryset=None): - organization = super(OrganizationRequestBaseView, self).get_object(queryset) - if not ( - organization.admins.filter(id=self.request.profile.id).exists() - or organization.registrant_id == self.request.profile.id - ): - raise PermissionDenied() - return organization - def get_content_title(self): return _("Manage join requests") diff --git a/resources/base.scss b/resources/base.scss index 79452fcb..5e34d9f6 100644 --- a/resources/base.scss +++ b/resources/base.scss @@ -806,16 +806,6 @@ noscript #noscript { margin-bottom: 1em; } -#loading-bar { - position: fixed; - top: 0; - left: 0; - height: 2px; - background-color: $theme_color; - width: 0; - z-index: 9999; -} - .nav-right-text { font-weight: normal; font-size: small; diff --git a/resources/common.js b/resources/common.js index 1e4c76dc..aaaceec4 100644 --- a/resources/common.js +++ b/resources/common.js @@ -386,44 +386,215 @@ function activateBlogBoxOnClick() { } function changeTabParameter(newTab) { - const url = new URL(window.location); - const searchParams = new URLSearchParams(url.search); - searchParams.set('tab', newTab); - searchParams.delete('page'); - url.search = searchParams.toString(); - return url.href; + const url = new URL(window.location); + const searchParams = new URLSearchParams(url.search); + searchParams.set('tab', newTab); + searchParams.delete('page'); + url.search = searchParams.toString(); + return url.href; } function submitFormWithParams($form, method) { - const currentUrl = new URL(window.location.href); - const searchParams = new URLSearchParams(currentUrl.search); - const formData = $form.serialize(); - - const params = new URLSearchParams(formData); - - if (searchParams.has('tab')) { - params.set('tab', searchParams.get('tab')); - } - - const fullUrl = currentUrl.pathname + '?' + params.toString(); - - if (method === "GET") { - window.location.href = fullUrl; - } - else { - var $formToSubmit = $('