CSS changes

This commit is contained in:
zandercymatics 2024-01-05 14:45:37 -07:00
parent 693058c02a
commit 0ae2cb72e3
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
6 changed files with 37 additions and 9 deletions

View file

@ -27,7 +27,7 @@
} }
th.action-col-custom-width { th.action-col-custom-width {
width: 27% !important; width: 23.25% !important;
} }
// Fix margins in mobile view // Fix margins in mobile view

View file

@ -0,0 +1,12 @@
@use "uswds-core" as *;
.usa-modal.wider-modal {
width: 40% !important;
max-width: 40% !important;
}
.usa-modal {
.usa-modal__heading.blue-header{
color: $dhs-blue;
}
}

View file

@ -17,6 +17,7 @@
@forward "tables"; @forward "tables";
@forward "sidenav"; @forward "sidenav";
@forward "register-form"; @forward "register-form";
@forward "usa-modal";
/*-------------------------------------------------- /*--------------------------------------------------
--- Admin ---------------------------------*/ --- Admin ---------------------------------*/

View file

@ -48,6 +48,9 @@
> >
<span class="usa-sr-only">Action</span> <span class="usa-sr-only">Action</span>
</th> </th>
{% if has_deletable_applications %}
<th></th>
{% endif %}
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -86,6 +89,9 @@
{% endif %} {% endif %}
</a> </a>
</td> </td>
{% if has_deletable_applications %}
<td></td>
{% endif %}
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
@ -119,7 +125,13 @@
{% for application in domain_applications %} {% for application in domain_applications %}
<tr> <tr>
<th th scope="row" role="rowheader" data-label="Domain name"> <th th scope="row" role="rowheader" data-label="Domain name">
{{ application.requested_domain.name|default:"New domain request" }} {% if application.requested_domain and application.requested_domain.name %}
{{ application.requested_domain.name }}
{% elif forloop.counter != 1 %}
New domain request {{ forloop.counter }}
{% else %}
New domain request
{% endif %}
</th> </th>
<td data-sort-value="{{ application.submission_date|date:"U" }}" data-label="Date submitted"> <td data-sort-value="{{ application.submission_date|date:"U" }}" data-label="Date submitted">
{% if application.submission_date %} {% if application.submission_date %}
@ -135,7 +147,7 @@
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24"> <svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
<use xlink:href="{%static 'img/sprite.svg'%}#edit"></use> <use xlink:href="{%static 'img/sprite.svg'%}#edit"></use>
</svg> </svg>
Edit <span class="usa-sr-only">{{ application.requested_domain.name|default:"New domain request" }} </span> Edit <span class="usa-sr-only">{{ application.requested_domain.name|default:"New domain request"|add:forloop.counter|add:"" }} </span>
{% else %} {% else %}
<a href="{% url 'application-status' application.pk %}"> <a href="{% url 'application-status' application.pk %}">
@ -163,16 +175,18 @@
</a> </a>
<div <div
class="usa-modal" class="usa-modal wider-modal"
id="toggle-delete-domain-alert-{{ forloop.counter }}" id="toggle-delete-domain-alert-{{ forloop.counter }}"
aria-labelledby="Are you sure you want to continue?" aria-labelledby="Are you sure you want to continue?"
aria-describedby="User will be removed" aria-describedby="User will be removed"
data-force-action data-force-action
> >
<form method="POST" action="{% url "application-delete" pk=application.id %}"> <form method="POST" action="{% url "application-delete" pk=application.id %}">
{% with heading="Are you sure you want to delete "|add:application.requested_domain.name|add:"?" %} {% if application.requested_domain %}
{% include 'includes/modal.html' with modal_heading=heading modal_description="This will remove the domain request from the .gov registrar. This action cannot be undone." modal_button=modal_button|safe %} {% include 'includes/modal.html' with modal_heading="Are you sure you want to delete "|add:application.requested_domain.name|add:"?" modal_description="This will remove the domain request from the .gov registrar. This action cannot be undone." modal_button=modal_button|safe %}
{% endwith %} {% else %}
{% include 'includes/modal.html' with modal_heading="Are you sure you want to delete your domain request?" modal_description="This will remove the domain request from the .gov registrar. This action cannot be undone." modal_button=modal_button|safe %}
{% endif %}
</form> </form>
</div> </div>
{% endif %} {% endif %}

View file

@ -2,7 +2,7 @@
<div class="usa-modal__content"> <div class="usa-modal__content">
<div class="usa-modal__main"> <div class="usa-modal__main">
<h2 class="usa-modal__heading" id="modal-1-heading"> <h2 class="usa-modal__heading blue-header" id="modal-1-heading">
{{ modal_heading }} {{ modal_heading }}
</h2> </h2>
<div class="usa-prose"> <div class="usa-prose">

View file

@ -21,7 +21,7 @@ def index(request):
# Determine if the user will see applications that they can delete # Determine if the user will see applications that they can delete
valid_statuses = [DomainApplication.ApplicationStatus.STARTED, DomainApplication.ApplicationStatus.WITHDRAWN] valid_statuses = [DomainApplication.ApplicationStatus.STARTED, DomainApplication.ApplicationStatus.WITHDRAWN]
has_deletable_applications = applications.filter(status__in=valid_statuses) has_deletable_applications = applications.filter(status__in=valid_statuses).exists()
context["has_deletable_applications"] = has_deletable_applications context["has_deletable_applications"] = has_deletable_applications
if has_deletable_applications: if has_deletable_applications:
@ -32,4 +32,5 @@ def index(request):
) )
context["modal_button"] = modal_button context["modal_button"] = modal_button
return render(request, "home.html", context) return render(request, "home.html", context)