From 1d7b8297a47301b46a430e5b9430d48e651c81ee Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Wed, 26 Jul 2023 10:16:57 +0200 Subject: [PATCH] Move css from custom file. --- hypha/apply/funds/views.py | 4 ++-- hypha/static_src/src/sass/apply/components/_link.scss | 8 +++++--- hypha/static_src/src/sass/apply/custom/_custom.scss | 6 +----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/hypha/apply/funds/views.py b/hypha/apply/funds/views.py index 737eea50bb..2054fb8351 100644 --- a/hypha/apply/funds/views.py +++ b/hypha/apply/funds/views.py @@ -1430,11 +1430,11 @@ def withdraw(self, request, *args, **kwargs): if not settings.ENABLE_SUBMISSION_WITHDRAWAL: raise PermissionDenied - obj = self.get_object() - if not request.user.is_applicant: raise PermissionDenied + obj = self.get_object() + withdraw_actions = [action for action in obj.workflow[obj.status].transitions.keys() if 'withdraw' in action] if len(withdraw_actions) > 0: diff --git a/hypha/static_src/src/sass/apply/components/_link.scss b/hypha/static_src/src/sass/apply/components/_link.scss index 0edca13edc..989ff2ca37 100644 --- a/hypha/static_src/src/sass/apply/components/_link.scss +++ b/hypha/static_src/src/sass/apply/components/_link.scss @@ -230,7 +230,8 @@ } &--edit-submission, - &--delete-submission { + &--delete-submission, + &--withdraw-submission { display: flex; align-items: center; font-weight: $weight--bold; @@ -249,12 +250,13 @@ } } - &--delete-submission { + &--delete-submission, + &--withdraw-submission { margin-right: 1rem; padding-right: 1rem; border-right: 2px solid $color--mid-grey; - &:only-child { + &:last-child { border-right: 0; padding-right: 0; margin-right: 0; diff --git a/hypha/static_src/src/sass/apply/custom/_custom.scss b/hypha/static_src/src/sass/apply/custom/_custom.scss index 55e678b65a..061b3d43d2 100644 --- a/hypha/static_src/src/sass/apply/custom/_custom.scss +++ b/hypha/static_src/src/sass/apply/custom/_custom.scss @@ -1,5 +1 @@ -.link--withdraw-submission { - margin-right: 1rem; - padding-right: 1rem; - font-weight: 700; -} +// stylelint-disable no-empty-source