mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-17 23:14:11 +02:00
Matched figma padding
This commit is contained in:
parent
81e5f5f8bb
commit
7fafecab0a
7 changed files with 50 additions and 36 deletions
|
@ -26,7 +26,6 @@ $letter-space--xs: .0125em;
|
||||||
@use "uswds-core" as *;
|
@use "uswds-core" as *;
|
||||||
|
|
||||||
/* Styles for making visible to screen reader / AT users only. */
|
/* Styles for making visible to screen reader / AT users only. */
|
||||||
|
|
||||||
.sr-only {
|
.sr-only {
|
||||||
@include sr-only;
|
@include sr-only;
|
||||||
}
|
}
|
||||||
|
@ -441,3 +440,13 @@ abbr[title] {
|
||||||
font-size: units(3);
|
font-size: units(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The icon was off center for some reason
|
||||||
|
// Fixes that issue
|
||||||
|
@media (min-width: 64em){
|
||||||
|
.usa-alert--warning{
|
||||||
|
.usa-alert__body::before {
|
||||||
|
left: 1rem !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<main id="main-content" class="grid-container">
|
<main id="main-content" class="grid-container">
|
||||||
|
|
||||||
{% if is_analyst_or_superuser and analyst_action == 'edit' and analyst_action_location == domain.pk %}
|
{% if is_analyst_or_superuser and analyst_action == 'edit' and analyst_action_location == domain.pk %}
|
||||||
<div class="usa-alert usa-alert--warning">
|
<div class="usa-alert usa-alert--warning margin-bottom-2">
|
||||||
<div class="usa-alert__body">
|
<div class="usa-alert__body">
|
||||||
<h4 class="usa-alert__heading larger-font-sizing">Attention!</h4>
|
<h4 class="usa-alert__heading larger-font-sizing">Attention!</h4>
|
||||||
<p class="usa-alert__text ">
|
<p class="usa-alert__text ">
|
||||||
|
|
|
@ -2,7 +2,12 @@
|
||||||
|
|
||||||
from django.contrib.auth.mixins import PermissionRequiredMixin
|
from django.contrib.auth.mixins import PermissionRequiredMixin
|
||||||
|
|
||||||
from registrar.models import DomainApplication, DomainInvitation, DomainInformation, UserDomainRole
|
from registrar.models import (
|
||||||
|
DomainApplication,
|
||||||
|
DomainInvitation,
|
||||||
|
DomainInformation,
|
||||||
|
UserDomainRole,
|
||||||
|
)
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -71,11 +76,10 @@ class DomainPermission(PermissionsLoginMixin):
|
||||||
|
|
||||||
session = self.request.session
|
session = self.request.session
|
||||||
# Check if the user is attempting a valid edit action.
|
# Check if the user is attempting a valid edit action.
|
||||||
# If analyst_action is present, analyst_action_location will be present.
|
|
||||||
# if it isn't, then it either suggests tampering
|
|
||||||
# or a larger omnipresent issue with sessions.
|
|
||||||
can_do_action = (
|
can_do_action = (
|
||||||
"analyst_action" in session and session["analyst_action_location"] == pk
|
"analyst_action" in session
|
||||||
|
and "analyst_action_location" in session
|
||||||
|
and session["analyst_action_location"] == pk
|
||||||
)
|
)
|
||||||
|
|
||||||
# If the valid session keys exist, if the user is permissioned,
|
# If the valid session keys exist, if the user is permissioned,
|
||||||
|
|
|
@ -34,14 +34,15 @@ class DomainPermissionView(DomainPermission, DetailView, abc.ABC):
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
user = self.request.user
|
user = self.request.user
|
||||||
|
|
||||||
context["is_analyst_or_superuser"] = user.is_staff or user.is_superuser
|
context["is_analyst_or_superuser"] = user.is_staff or user.is_superuser
|
||||||
# Flag to see if an analyst is attempting to make edits
|
|
||||||
if "analyst_action" in self.request.session:
|
|
||||||
# Stored in a variable for the linter
|
# Stored in a variable for the linter
|
||||||
action = "analyst_action"
|
action = "analyst_action"
|
||||||
|
action_location = "analyst_action_location"
|
||||||
|
# Flag to see if an analyst is attempting to make edits
|
||||||
|
if action in self.request.session:
|
||||||
context[action] = self.request.session[action]
|
context[action] = self.request.session[action]
|
||||||
context[f"{action}_location"] = self.request.session[f"{action}_location"]
|
if action_location in self.request.session:
|
||||||
|
context[action_location] = self.request.session[action_location]
|
||||||
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue