From d32d94c5489caac80474ad9b00eb46d76adf6d91 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Wed, 24 Apr 2024 14:06:13 -0600 Subject: [PATCH 01/88] Display --- src/registrar/assets/sass/_theme/_admin.scss | 8 +++++++ .../templates/admin/change_list.html | 22 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/registrar/assets/sass/_theme/_admin.scss b/src/registrar/assets/sass/_theme/_admin.scss index f5717d067..ad627e106 100644 --- a/src/registrar/assets/sass/_theme/_admin.scss +++ b/src/registrar/assets/sass/_theme/_admin.scss @@ -617,3 +617,11 @@ address.dja-address-contact-list { .usa-button__small-text { font-size: small; } + +p.django-admin__model-description{ + color: var(--primary); + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; +} diff --git a/src/registrar/templates/admin/change_list.html b/src/registrar/templates/admin/change_list.html index 05c2d4e64..78fa69fb5 100644 --- a/src/registrar/templates/admin/change_list.html +++ b/src/registrar/templates/admin/change_list.html @@ -2,6 +2,28 @@ {% block content_title %}
+ This table contains all domain requests that have been started within the registrar and the status of those requests. + Updating values here will immediately update the corresponding values that users see in the registrar. + Once a domain request has been adjudicated, the details of that request should not be modified. + To update attributes (like an organization’s name) after a domain’s approval, go to Domains. + Similar fields display on each Domain page, but edits made there will not affect the corresponding domain request. +
+ {% elif opts.model_name == 'contact' %} +
+ Contacts include anyone who has access to the registrar (known as “users”) and anyone listed in a domain request,
+ including other employees and authorizing officials.
+ Only contacts who have access to the registrar will have a corresponding record within the Users table.
+
+ Updating someone’s contact information here will not affect that person’s Login.gov information.
+
- This table contains all domain requests that have been started within the registrar and the status of those requests. - Updating values here will immediately update the corresponding values that users see in the registrar. - Once a domain request has been adjudicated, the details of that request should not be modified. - To update attributes (like an organization’s name) after a domain’s approval, go to Domains. - Similar fields display on each Domain page, but edits made there will not affect the corresponding domain request. -
- {% elif opts.model_name == 'contact' %} -
- Contacts include anyone who has access to the registrar (known as “users”) and anyone listed in a domain request,
- including other employees and authorizing officials.
- Only contacts who have access to the registrar will have a corresponding record within the Users table.
-
- Updating someone’s contact information here will not affect that person’s Login.gov information.
-
+ {{ model_description|safe }} +
- {{ model_description|safe }}
+ {% if opts.model_name == 'domainrequest' %}
+ This table contains all domain requests that have been started within the registrar and the status of those requests.
+ Updating values here will immediately update the corresponding values that users see in the registrar.
+
+ Once a domain request has been adjudicated, the details of that request should not be modified.
+ To update attributes (like an organization’s name) after a domain’s approval,
+ go to Domains.
+ Similar fields display on each Domain page, but edits made there will not affect the corresponding domain request.
+ {% elif opts.model_name == 'domaininformation' %}
+ Domain information represents the basic metadata for an approved domain and the organization that manages it.
+ It does not include any information specific to the registry (DNS name servers, security email).
+ Registry-related information
+ can be managed within the Domains table.
+
+
+ {# Acts as a
#}
+
- {% if opts.model_name == 'domainrequest' %}
- This table contains all domain requests that have been started within the registrar and the status of those requests.
- Updating values here will immediately update the corresponding values that users see in the registrar.
-
- Once a domain request has been adjudicated, the details of that request should not be modified.
- To update attributes (like an organization’s name) after a domain’s approval,
- go to Domains.
- Similar fields display on each Domain page, but edits made there will not affect the corresponding domain request.
- {% elif opts.model_name == 'domaininformation' %}
- Domain information represents the basic metadata for an approved domain and the organization that manages it.
- It does not include any information specific to the registry (DNS name servers, security email).
- Registry-related information
- can be managed within the Domains table.
-
-
- {# Acts as a
#}
-
+ This table contains all domain requests that have been started within the registrar and the status of those requests. + Updating values here will immediately update the corresponding values that users see in the registrar. +
+ ++ Once a domain request has been adjudicated, the details of that request should not be modified. + To update attributes (like an organization’s name) after a domain’s approval, + go to Domains. + Similar fields display on each Domain page, but edits made there will not affect the corresponding domain request. +
+ {% elif opts.model_name == 'domaininformation' %} ++ Domain information represents the basic metadata for an approved domain and the organization that manages it. + It does not include any information specific to the registry (DNS name servers, security email). + Registry-related information + can be managed within the Domains table. +
+ ++ Updating values here will immediately update the corresponding values that users see in the registrar. +
+ ++ Domain information is similar to Domain requests, + and the fields are nearly identical, + but edits made to one are not made to the other. + Domain information exists so we don’t modify details of an approved request after adjudication + (since a domain request should be maintained as-adjudicated for records retention purposes). + Entries are created here upon approval of a domain request. +
+ {% elif opts.model_name == 'contact' %} ++ Contacts include anyone who has access to the registrar (known as “users”) and anyone listed in a domain request, + including other employees and authorizing officials. + Only contacts who have access to the registrar will have + a corresponding record within the Users table. + Updating someone’s contact information here will not affect that person’s Login.gov information. +
+ {% elif opts.model_name == 'auditlog' %} ++ Log entries represent instances where something was created, updated, or deleted within the registrar or /admin. + The table on this page is useful for searching actions across all records. + To understand what happened to an individual record (like a domain request), + it’s better to go to that specific page + (Domain requests) and click on the “History” button. +
+ {% elif opts.model_name == 'domain'%} ++ This table contains all approved domains in the .gov registrar. + In other words, with the exception of domains in the “Unknown”, ”On hold”, and “Deleted” states, + this table matches the list of domains in the .gov zone file. +
+ ++ Individual domain pages allow you to view registry-related details and edit the associated domain information. +
+ ++ Other actions available on the domain page include the ability to: +
++ To view a domain from a domain manager’s perspective, click the "Manage domain" button. + That will allow you to make changes (e.g., update DNS settings, invite people to manage the domain) + directly inside the registrar. +
+ {% elif opts.model_name == 'draftdomain' %} ++ This table represents all “requested domains” that have been saved within a domain request form. + If a registrant changes the requested domain in their form, + the original name they listed and the new name will appear as separate records. +
+ ++ This table does not include “alternative domains,” + which are housed in the Websites table. +
+ {% elif opts.model_name == 'host' %} ++ Entries in the Hosts table indicate the relationship between an approved domain and a name server address + (and, if applicable, the IP address for a name server address). +
+ ++ In general, you should not modify these values here. They should be updated directly inside the registrar. + To update a domain’s name servers and/or IP addresses, + in the registrar, go to the domain in Domains, + then click the "Manage domain" button. +
+ {% elif opts.model_name == 'publiccontact' %} ++ Public contacts represent the three registry contact types (administrative, technical, and security) + and their fields that are exposed in WHOIS data. +
+ ++ We don’t currently allow registrants to publish real contact information to WHOIS, + but we must publish something to WHOIS. For each of the contact types, we use default values that are + associated with the program instead of the real contact information, + which we then redact in whole at the registry/WHOIS. + We do allow registrants to set a security contact email address, + which is published to WHOIS when a user sets one. +
+ ++ The public contacts in this table are a reflection of the data in the registry and should not be updated. + This information is primarily used by developers for validation purposes. +
+ {% elif opts.model_name == 'transitiondomain' %} ++ This table represents the domains that were transitioned from the old registry in November 2023. + This data has been preserved for historical reference and should not be updated. +
+ {% elif opts.model_name == 'userdomainrole' %} ++ This table represents the managers who are assigned to each domain in the registrar. + There are separate records for each domain/manager combination. + Managers can update information related to a domain, such as DNS data and security contact. +
+ ++ The creator of an approved domain request automatically becomes a manager for that domain. + Anyone who retrieves a domain invitation is also assigned the manager role. +
+ {% elif opts.model_name == 'usergroup' %} ++ Groups are a way to bundle admin permissions so they can be easily assigned to multiple users. + Once a group is created, it can be assigned to people via the Users table. +
+ ++ To maintain a single source of truth across all environments (stable, staging, etc.), + the groups and permissions are set and updated through the codebase. + Do not add, edit or delete user groups here. +
+ {% elif opts.model_name == 'user' %} ++ A user is anyone who has access to the registrar. This includes request creators, domain managers, and CISA administrators. + Within each user record, you can review that user’s permissions and user status. +
+ ++ If a user has a domain request in ineligible status, then their user status will be “restricted.” + Users who are in restricted status cannot create/edit domain requests or approved domains, + and their existing requests are locked. They will see a 403 error if they try to take action in the registrar. +
+ ++ Each user record displays the associated “contact” info for that user, + which is the same info found in the Contacts table. + Updating these details on the user record will also update the corresponding contact record for that user. +
+ {% elif opts.model_name == 'verifiedbystaff' %} ++ This table contains users who have been allowed to bypass identity proofing through Login.gov after approval by a CISA representative. + Bypassing identity proofing means they will not be asked to provide a form of ID, PII, and so on. +
+ ++ Additions to this table should be rare, and only after obtaining confirmation of their identity directly (or from a trusted person). + Once a verified-by-staff user has been added as a domain manager, they can be removed from this list, + (However, if they are removed as a domain manager for all domains and they attempt to sign in again, they will be identity proofed by Login.gov). +
+ {% elif opts.model_name == 'websites' %} ++ This section lists all the “current websites” and “alternative domains” that users have submitted in domain requests since January 2024. +
+ ++ This does not include any “requested domains” that have appeared within the Domain requests table. + Those names are managed in the Draft domains table. +
+ {% endif %} +- This table contains all domain requests that have been started within the registrar and the status of those requests. - Updating values here will immediately update the corresponding values that users see in the registrar. -
+ ++ This table contains all domain requests that have been started within the registrar and the status of those requests. + Updating values here will immediately update the corresponding values that users see in the registrar. +
-- Once a domain request has been adjudicated, the details of that request should not be modified. - To update attributes (like an organization’s name) after a domain’s approval, - go to Domains. - Similar fields display on each Domain page, but edits made there will not affect the corresponding domain request. -
- {% elif opts.model_name == 'domaininformation' %} -- Domain information represents the basic metadata for an approved domain and the organization that manages it. - It does not include any information specific to the registry (DNS name servers, security email). - Registry-related information - can be managed within the Domains table. -
++ Once a domain request has been adjudicated, the details of that request should not be modified. + To update attributes (like an organization’s name) after a domain’s approval, + go to Domains. + Similar fields display on each Domain page, but edits made there will not affect the corresponding domain request. +
+ {% elif opts.model_name == 'domaininformation' %} ++ Domain information represents the basic metadata for an approved domain and the organization that manages it. + It does not include any information specific to the registry (DNS name servers, security email). + Registry-related information + can be managed within the Domains table. +
-- Updating values here will immediately update the corresponding values that users see in the registrar. -
++ Updating values here will immediately update the corresponding values that users see in the registrar. +
-- Domain information is similar to Domain requests, - and the fields are nearly identical, - but edits made to one are not made to the other. - Domain information exists so we don’t modify details of an approved request after adjudication - (since a domain request should be maintained as-adjudicated for records retention purposes). - Entries are created here upon approval of a domain request. -
- {% elif opts.model_name == 'contact' %} -- Contacts include anyone who has access to the registrar (known as “users”) and anyone listed in a domain request, - including other employees and authorizing officials. - Only contacts who have access to the registrar will have - a corresponding record within the Users table. - Updating someone’s contact information here will not affect that person’s Login.gov information. -
- {% elif opts.model_name == 'auditlog' %} -- Log entries represent instances where something was created, updated, or deleted within the registrar or /admin. - The table on this page is useful for searching actions across all records. - To understand what happened to an individual record (like a domain request), - it’s better to go to that specific page - (Domain requests) and click on the “History” button. -
- {% elif opts.model_name == 'domain'%} -- This table contains all approved domains in the .gov registrar. - In other words, with the exception of domains in the “Unknown”, ”On hold”, and “Deleted” states, - this table matches the list of domains in the .gov zone file. -
++ Domain information is similar to Domain requests, + and the fields are nearly identical, + but edits made to one are not made to the other. + Domain information exists so we don’t modify details of an approved request after adjudication + (since a domain request should be maintained as-adjudicated for records retention purposes). + Entries are created here upon approval of a domain request. +
+ {% elif opts.model_name == 'contact' %} ++ Contacts include anyone who has access to the registrar (known as “users”) and anyone listed in a domain request, + including other employees and authorizing officials. + Only contacts who have access to the registrar will have + a corresponding record within the Users table. + Updating someone’s contact information here will not affect that person’s Login.gov information. +
+ {% elif opts.model_name == 'auditlog' %} ++ Log entries represent instances where something was created, updated, or deleted within the registrar or /admin. + The table on this page is useful for searching actions across all records. + To understand what happened to an individual record (like a domain request), + it’s better to go to that specific page + (Domain requests) and click on the “History” button. +
+ {% elif opts.model_name == 'domain'%} ++ This table contains all approved domains in the .gov registrar. + In other words, with the exception of domains in the “Unknown”, ”On hold”, and “Deleted” states, + this table matches the list of domains in the .gov zone file. +
-- Individual domain pages allow you to view registry-related details and edit the associated domain information. -
++ Individual domain pages allow you to view registry-related details and edit the associated domain information. +
-- Other actions available on the domain page include the ability to: -
-+ Other actions available on the domain page include the ability to: +
+- To view a domain from a domain manager’s perspective, click the "Manage domain" button. - That will allow you to make changes (e.g., update DNS settings, invite people to manage the domain) - directly inside the registrar. -
- {% elif opts.model_name == 'draftdomain' %} -- This table represents all “requested domains” that have been saved within a domain request form. - If a registrant changes the requested domain in their form, - the original name they listed and the new name will appear as separate records. -
- -- This table does not include “alternative domains,” - which are housed in the Websites table. -
- {% elif opts.model_name == 'host' %} -- Entries in the Hosts table indicate the relationship between an approved domain and a name server address - (and, if applicable, the IP address for a name server address). -
++ To view a domain from a domain manager’s perspective, click the "Manage domain" button. + That will allow you to make changes (e.g., update DNS settings, invite people to manage the domain) + directly inside the registrar. +
+ {% elif opts.model_name == 'draftdomain' %} ++ This table represents all “requested domains” that have been saved within a domain request form. + If a registrant changes the requested domain in their form, + the original name they listed and the new name will appear as separate records. +
+ ++ This table does not include “alternative domains,” + which are housed in the Websites table. +
+ {% elif opts.model_name == 'host' %} ++ Entries in the Hosts table indicate the relationship between an approved domain and a name server address + (and, if applicable, the IP address for a name server address). +
-- In general, you should not modify these values here. They should be updated directly inside the registrar. - To update a domain’s name servers and/or IP addresses, - in the registrar, go to the domain in Domains, - then click the "Manage domain" button. -
- {% elif opts.model_name == 'publiccontact' %} -- Public contacts represent the three registry contact types (administrative, technical, and security) - and their fields that are exposed in WHOIS data. -
++ In general, you should not modify these values here. They should be updated directly inside the registrar. + To update a domain’s name servers and/or IP addresses, + in the registrar, go to the domain in Domains, + then click the "Manage domain" button. +
+ {% elif opts.model_name == 'publiccontact' %} ++ Public contacts represent the three registry contact types (administrative, technical, and security) + and their fields that are exposed in WHOIS data. +
-- We don’t currently allow registrants to publish real contact information to WHOIS, - but we must publish something to WHOIS. For each of the contact types, we use default values that are - associated with the program instead of the real contact information, - which we then redact in whole at the registry/WHOIS. - We do allow registrants to set a security contact email address, - which is published to WHOIS when a user sets one. -
++ We don’t currently allow registrants to publish real contact information to WHOIS, + but we must publish something to WHOIS. For each of the contact types, we use default values that are + associated with the program instead of the real contact information, + which we then redact in whole at the registry/WHOIS. + We do allow registrants to set a security contact email address, + which is published to WHOIS when a user sets one. +
-- The public contacts in this table are a reflection of the data in the registry and should not be updated. - This information is primarily used by developers for validation purposes. -
- {% elif opts.model_name == 'transitiondomain' %} -- This table represents the domains that were transitioned from the old registry in November 2023. - This data has been preserved for historical reference and should not be updated. -
- {% elif opts.model_name == 'userdomainrole' %} -- This table represents the managers who are assigned to each domain in the registrar. - There are separate records for each domain/manager combination. - Managers can update information related to a domain, such as DNS data and security contact. -
++ The public contacts in this table are a reflection of the data in the registry and should not be updated. + This information is primarily used by developers for validation purposes. +
+ {% elif opts.model_name == 'transitiondomain' %} ++ This table represents the domains that were transitioned from the old registry in November 2023. + This data has been preserved for historical reference and should not be updated. +
+ {% elif opts.model_name == 'userdomainrole' %} ++ This table represents the managers who are assigned to each domain in the registrar. + There are separate records for each domain/manager combination. + Managers can update information related to a domain, such as DNS data and security contact. +
-- The creator of an approved domain request automatically becomes a manager for that domain. - Anyone who retrieves a domain invitation is also assigned the manager role. -
- {% elif opts.model_name == 'usergroup' %} -- Groups are a way to bundle admin permissions so they can be easily assigned to multiple users. - Once a group is created, it can be assigned to people via the Users table. -
++ The creator of an approved domain request automatically becomes a manager for that domain. + Anyone who retrieves a domain invitation is also assigned the manager role. +
+ {% elif opts.model_name == 'usergroup' %} ++ Groups are a way to bundle admin permissions so they can be easily assigned to multiple users. + Once a group is created, it can be assigned to people via the Users table. +
-- To maintain a single source of truth across all environments (stable, staging, etc.), - the groups and permissions are set and updated through the codebase. - Do not add, edit or delete user groups here. -
- {% elif opts.model_name == 'user' %} -- A user is anyone who has access to the registrar. This includes request creators, domain managers, and CISA administrators. - Within each user record, you can review that user’s permissions and user status. -
++ To maintain a single source of truth across all environments (stable, staging, etc.), + the groups and permissions are set and updated through the codebase. + Do not add, edit or delete user groups here. +
+ {% elif opts.model_name == 'user' %} ++ A user is anyone who has access to the registrar. This includes request creators, domain managers, and CISA administrators. + Within each user record, you can review that user’s permissions and user status. +
-- If a user has a domain request in ineligible status, then their user status will be “restricted.” - Users who are in restricted status cannot create/edit domain requests or approved domains, - and their existing requests are locked. They will see a 403 error if they try to take action in the registrar. -
++ If a user has a domain request in ineligible status, then their user status will be “restricted.” + Users who are in restricted status cannot create/edit domain requests or approved domains, + and their existing requests are locked. They will see a 403 error if they try to take action in the registrar. +
-- Each user record displays the associated “contact” info for that user, - which is the same info found in the Contacts table. - Updating these details on the user record will also update the corresponding contact record for that user. -
- {% elif opts.model_name == 'verifiedbystaff' %} -- This table contains users who have been allowed to bypass identity proofing through Login.gov after approval by a CISA representative. - Bypassing identity proofing means they will not be asked to provide a form of ID, PII, and so on. -
++ Each user record displays the associated “contact” info for that user, + which is the same info found in the Contacts table. + Updating these details on the user record will also update the corresponding contact record for that user. +
+ {% elif opts.model_name == 'verifiedbystaff' %} ++ This table contains users who have been allowed to bypass identity proofing through Login.gov after approval by a CISA representative. + Bypassing identity proofing means they will not be asked to provide a form of ID, PII, and so on. +
-- Additions to this table should be rare, and only after obtaining confirmation of their identity directly (or from a trusted person). - Once a verified-by-staff user has been added as a domain manager, they can be removed from this list, - (However, if they are removed as a domain manager for all domains and they attempt to sign in again, they will be identity proofed by Login.gov). -
- {% elif opts.model_name == 'websites' %} -- This section lists all the “current websites” and “alternative domains” that users have submitted in domain requests since January 2024. -
++ Additions to this table should be rare, and only after obtaining confirmation of their identity directly (or from a trusted person). + Once a verified-by-staff user has been added as a domain manager, they can be removed from this list, + (However, if they are removed as a domain manager for all domains and they attempt to sign in again, they will be identity proofed by Login.gov). +
+ {% elif opts.model_name == 'website' %} ++ This table lists all the “current websites” and “alternative domains” that users have submitted in domain requests since January 2024. +
-- This does not include any “requested domains” that have appeared within the Domain requests table. - Those names are managed in the Draft domains table. -
- {% endif %} -+ This does not include any “requested domains” that have appeared within the Domain requests table. + Those names are managed in the Draft domains table. +
+ {% else %} +This table does not have a description yet.
+ {% endif %} +This table does not have a description yet.
{% endif %} - + \ No newline at end of file From 0bcc9ca43ac0153b06835bd98ebd83ccaa683b89 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Thu, 25 Apr 2024 12:36:42 -0600 Subject: [PATCH 07/88] Add styling + javascript --- src/registrar/assets/js/get-gov-admin.js | 24 +++++++++++++++ src/registrar/assets/sass/_theme/_admin.scss | 29 ++++++++++++------- .../templates/admin/model_descriptions.html | 4 +-- 3 files changed, 45 insertions(+), 12 deletions(-) diff --git a/src/registrar/assets/js/get-gov-admin.js b/src/registrar/assets/js/get-gov-admin.js index 2909a48be..3a5c9c184 100644 --- a/src/registrar/assets/js/get-gov-admin.js +++ b/src/registrar/assets/js/get-gov-admin.js @@ -555,3 +555,27 @@ function enableRelatedWidgetButtons(changeLink, deleteLink, viewLink, elementPk, observer.observe(targetElement); } })(); + +/** An IIFE for toggling the overflow styles on django-admin__model-description (the show more / show less button) */ +(function () { + let toggleButton = document.getElementById('dja-show-more-model-description'); + let descriptionDiv = document.querySelector('.dja__model-description'); + + if (toggleButton && descriptionDiv) { + toggleButton.addEventListener('click', function() { + // Toggle the class on the description div + descriptionDiv.classList.toggle('dja__model-description--no-overflow'); + + // Change the button text based on the presence of the class + if (descriptionDiv.classList.contains('dja__model-description--no-overflow')) { + toggleButton.textContent = 'Show less'; + + // Move the div to where it was when the page first loaded + descriptionDiv.appendChild(toggleButton); + } else { + toggleButton.textContent = 'Show more'; + descriptionDiv.insertAdjacentElement('afterend', toggleButton); + } + }); + } +})(); \ No newline at end of file diff --git a/src/registrar/assets/sass/_theme/_admin.scss b/src/registrar/assets/sass/_theme/_admin.scss index 88c77cd09..898d3d538 100644 --- a/src/registrar/assets/sass/_theme/_admin.scss +++ b/src/registrar/assets/sass/_theme/_admin.scss @@ -618,7 +618,12 @@ address.dja-address-contact-list { font-size: small; } -div.django-admin__model-description{ +div.dja__model-description{ + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; + p, li { color: var(--primary); font-size: medium; @@ -629,13 +634,17 @@ div.django-admin__model-description{ list-style-type: disc; } - button { - margin-top: 25px !important; - height: 10px !important; - } - - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - overflow: hidden; +} + +.dja__model-description + button { + margin-top: 25px !important; + height: 10px !important; +} + +div.dja__model-description.dja__model-description--no-overflow { + display: block; + overflow: unset; + button { + margin-top: unset; + } } diff --git a/src/registrar/templates/admin/model_descriptions.html b/src/registrar/templates/admin/model_descriptions.html index d04fe9bbe..425c0e677 100644 --- a/src/registrar/templates/admin/model_descriptions.html +++ b/src/registrar/templates/admin/model_descriptions.html @@ -1,5 +1,5 @@ -This table contains all domain requests that have been started within the registrar and the status of those requests. @@ -184,5 +184,5 @@
This table does not have a description yet.
{% endif %}- This table contains all domain requests that have been started within the registrar and the status of those requests. - Updating values here will immediately update the corresponding values that users see in the registrar. -
-- Once a domain request has been adjudicated, the details of that request should not be modified. - To update attributes (like an organization’s name) after a domain’s approval, - go to Domains. - Similar fields display on each Domain page, but edits made there will not affect the corresponding domain request. -
- {% elif opts.model_name == 'domaininformation' %} -- Domain information represents the basic metadata for an approved domain and the organization that manages it. - It does not include any information specific to the registry (DNS name servers, security email). - Registry-related information - can be managed within the Domains table. -
++ This table contains all domain requests that have been started within the registrar and the status of those requests. + Updating values here will immediately update the corresponding values that users see in the registrar. +
-- Updating values here will immediately update the corresponding values that users see in the registrar. -
++ Once a domain request has been adjudicated, the details of that request should not be modified. + To update attributes (like an organization’s name) after a domain’s approval, + go to Domains. + Similar fields display on each Domain page, but edits made there will not affect the corresponding domain request. +
+ {% elif opts.model_name == 'domaininformation' %} ++ Domain information represents the basic metadata for an approved domain and the organization that manages it. + It does not include any information specific to the registry (DNS name servers, security email). + Registry-related information + can be managed within the Domains table. +
-- Domain information is similar to Domain requests, - and the fields are nearly identical, - but edits made to one are not made to the other. - Domain information exists so we don’t modify details of an approved request after adjudication - (since a domain request should be maintained as-adjudicated for records retention purposes). - Entries are created here upon approval of a domain request. -
- {% elif opts.model_name == 'contact' %} -- Contacts include anyone who has access to the registrar (known as “users”) and anyone listed in a domain request, - including other employees and authorizing officials. - Only contacts who have access to the registrar will have - a corresponding record within the Users table. - Updating someone’s contact information here will not affect that person’s Login.gov information. -
- {% elif opts.model_name == 'auditlog' %} -- Log entries represent instances where something was created, updated, or deleted within the registrar or /admin. - The table on this page is useful for searching actions across all records. - To understand what happened to an individual record (like a domain request), - it’s better to go to that specific page - (Domain requests) and click on the “History” button. -
- {% elif opts.model_name == 'domain'%} -- This table contains all approved domains in the .gov registrar. - In other words, with the exception of domains in the “Unknown”, ”On hold”, and “Deleted” states, - this table matches the list of domains in the .gov zone file. -
++ Updating values here will immediately update the corresponding values that users see in the registrar. +
-- Individual domain pages allow you to view registry-related details and edit the associated domain information. -
++ Domain information is similar to Domain requests, + and the fields are nearly identical, + but edits made to one are not made to the other. + Domain information exists so we don’t modify details of an approved request after adjudication + (since a domain request should be maintained as-adjudicated for records retention purposes). + Entries are created here upon approval of a domain request. +
+ {% elif opts.model_name == 'contact' %} ++ Contacts include anyone who has access to the registrar (known as “users”) and anyone listed in a domain request, + including other employees and authorizing officials. + Only contacts who have access to the registrar will have + a corresponding record within the Users table. + Updating someone’s contact information here will not affect that person’s Login.gov information. +
+ {% elif opts.model_name == 'auditlog' %} ++ Log entries represent instances where something was created, updated, or deleted within the registrar or /admin. + The table on this page is useful for searching actions across all records. + To understand what happened to an individual record (like a domain request), + it’s better to go to that specific page + (Domain requests) and click on the “History” button. +
+ {% elif opts.model_name == 'domain'%} ++ This table contains all approved domains in the .gov registrar. + In other words, with the exception of domains in the “Unknown”, ”On hold”, and “Deleted” states, + this table matches the list of domains in the .gov zone file. +
-- Other actions available on the domain page include the ability to: -
-+ Individual domain pages allow you to view registry-related details and edit the associated domain information. +
-- To view a domain from a domain manager’s perspective, click the "Manage domain" button. - That will allow you to make changes (e.g., update DNS settings, invite people to manage the domain) - directly inside the registrar. -
- {% elif opts.model_name == 'draftdomain' %} -- This table represents all “requested domains” that have been saved within a domain request form. - If a registrant changes the requested domain in their form, - the original name they listed and the new name will appear as separate records. -
- -- This table does not include “alternative domains,” - which are housed in the Websites table. -
- {% elif opts.model_name == 'host' %} -- Entries in the Hosts table indicate the relationship between an approved domain and a name server address - (and, if applicable, the IP address for a name server address). -
++ Other actions available on the domain page include the ability to: +
+- In general, you should not modify these values here. They should be updated directly inside the registrar. - To update a domain’s name servers and/or IP addresses, - in the registrar, go to the domain in Domains, - then click the "Manage domain" button. -
- {% elif opts.model_name == 'publiccontact' %} -- Public contacts represent the three registry contact types (administrative, technical, and security) - and their fields that are exposed in WHOIS data. -
++ To view a domain from a domain manager’s perspective, click the "Manage domain" button. + That will allow you to make changes (e.g., update DNS settings, invite people to manage the domain) + directly inside the registrar. +
+ {% elif opts.model_name == 'draftdomain' %} ++ This table represents all “requested domains” that have been saved within a domain request form. + If a registrant changes the requested domain in their form, + the original name they listed and the new name will appear as separate records. +
+ ++ This table does not include “alternative domains,” + which are housed in the Websites table. +
+ {% elif opts.model_name == 'host' %} ++ Entries in the Hosts table indicate the relationship between an approved domain and a name server address + (and, if applicable, the IP address for a name server address). +
-- We don’t currently allow registrants to publish real contact information to WHOIS, - but we must publish something to WHOIS. For each of the contact types, we use default values that are - associated with the program instead of the real contact information, - which we then redact in whole at the registry/WHOIS. - We do allow registrants to set a security contact email address, - which is published to WHOIS when a user sets one. -
++ In general, you should not modify these values here. They should be updated directly inside the registrar. + To update a domain’s name servers and/or IP addresses, + in the registrar, go to the domain in Domains, + then click the "Manage domain" button. +
+ {% elif opts.model_name == 'publiccontact' %} ++ Public contacts represent the three registry contact types (administrative, technical, and security) + and their fields that are exposed in WHOIS data. +
-- The public contacts in this table are a reflection of the data in the registry and should not be updated. - This information is primarily used by developers for validation purposes. -
- {% elif opts.model_name == 'transitiondomain' %} -- This table represents the domains that were transitioned from the old registry in November 2023. - This data has been preserved for historical reference and should not be updated. -
- {% elif opts.model_name == 'userdomainrole' %} -- This table represents the managers who are assigned to each domain in the registrar. - There are separate records for each domain/manager combination. - Managers can update information related to a domain, such as DNS data and security contact. -
++ We don’t currently allow registrants to publish real contact information to WHOIS, + but we must publish something to WHOIS. For each of the contact types, we use default values that are + associated with the program instead of the real contact information, + which we then redact in whole at the registry/WHOIS. + We do allow registrants to set a security contact email address, + which is published to WHOIS when a user sets one. +
-- The creator of an approved domain request automatically becomes a manager for that domain. - Anyone who retrieves a domain invitation is also assigned the manager role. -
- {% elif opts.model_name == 'usergroup' %} -- Groups are a way to bundle admin permissions so they can be easily assigned to multiple users. - Once a group is created, it can be assigned to people via the Users table. -
++ The public contacts in this table are a reflection of the data in the registry and should not be updated. + This information is primarily used by developers for validation purposes. +
+ {% elif opts.model_name == 'transitiondomain' %} ++ This table represents the domains that were transitioned from the old registry in November 2023. + This data has been preserved for historical reference and should not be updated. +
+ {% elif opts.model_name == 'userdomainrole' %} ++ This table represents the managers who are assigned to each domain in the registrar. + There are separate records for each domain/manager combination. + Managers can update information related to a domain, such as DNS data and security contact. +
-- To maintain a single source of truth across all environments (stable, staging, etc.), - the groups and permissions are set and updated through the codebase. - Do not add, edit or delete user groups here. -
- {% elif opts.model_name == 'user' %} -- A user is anyone who has access to the registrar. This includes request creators, domain managers, and CISA administrators. - Within each user record, you can review that user’s permissions and user status. -
++ The creator of an approved domain request automatically becomes a manager for that domain. + Anyone who retrieves a domain invitation is also assigned the manager role. +
+ {% elif opts.model_name == 'usergroup' %} ++ Groups are a way to bundle admin permissions so they can be easily assigned to multiple users. + Once a group is created, it can be assigned to people via the Users table. +
-- If a user has a domain request in ineligible status, then their user status will be “restricted.” - Users who are in restricted status cannot create/edit domain requests or approved domains, - and their existing requests are locked. They will see a 403 error if they try to take action in the registrar. -
++ To maintain a single source of truth across all environments (stable, staging, etc.), + the groups and permissions are set and updated through the codebase. + Do not add, edit or delete user groups here. +
+ {% elif opts.model_name == 'user' %} ++ A user is anyone who has access to the registrar. This includes request creators, domain managers, and CISA administrators. + Within each user record, you can review that user’s permissions and user status. +
-- Each user record displays the associated “contact” info for that user, - which is the same info found in the Contacts table. - Updating these details on the user record will also update the corresponding contact record for that user. -
- {% elif opts.model_name == 'verifiedbystaff' %} -- This table contains users who have been allowed to bypass identity proofing through Login.gov after approval by a CISA representative. - Bypassing identity proofing means they will not be asked to provide a form of ID, PII, and so on. -
++ If a user has a domain request in ineligible status, then their user status will be “restricted.” + Users who are in restricted status cannot create/edit domain requests or approved domains, + and their existing requests are locked. They will see a 403 error if they try to take action in the registrar. +
-- Additions to this table should be rare, and only after obtaining confirmation of their identity directly (or from a trusted person). - Once a verified-by-staff user has been added as a domain manager, they can be removed from this list, - (However, if they are removed as a domain manager for all domains and they attempt to sign in again, they will be identity proofed by Login.gov). -
- {% elif opts.model_name == 'website' %} -- This table lists all the “current websites” and “alternative domains” that users have submitted in domain requests since January 2024. -
++ Each user record displays the associated “contact” info for that user, + which is the same info found in the Contacts table. + Updating these details on the user record will also update the corresponding contact record for that user. +
+ {% elif opts.model_name == 'verifiedbystaff' %} ++ This table contains users who have been allowed to bypass identity proofing through Login.gov after approval by a CISA representative. + Bypassing identity proofing means they will not be asked to provide a form of ID, PII, and so on. +
-- This does not include any “requested domains” that have appeared within the Domain requests table. - Those names are managed in the Draft domains table. -
- {% else %} -This table does not have a description yet.
- {% endif %} -+ Additions to this table should be rare, and only after obtaining confirmation of their identity directly (or from a trusted person). + Once a verified-by-staff user has been added as a domain manager, they can be removed from this list, + (However, if they are removed as a domain manager for all domains and they attempt to sign in again, they will be identity proofed by Login.gov). +
+ {% elif opts.model_name == 'website' %} ++ This table lists all the “current websites” and “alternative domains” that users have submitted in domain requests since January 2024. +
+ ++ This does not include any “requested domains” that have appeared within the Domain requests table. + Those names are managed in the Draft domains table. +
+ {% else %} +This table does not have a description yet.
+ {% endif %} +From | +To | +Changed By | +Change Date | +
---|---|---|---|
{{ value.0|default:"None" }} | +{{ value.1|default:"None" }} | +{{ log_entry.actor|default:"None" }} | +{{ log_entry.timestamp|default:"None" }} | +
From | -To | -Changed By | -Change Date | +Status | +User | +Changed at | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ value.0|default:"None" }} | {{ value.1|default:"None" }} | {{ log_entry.actor|default:"None" }} | {{ log_entry.timestamp|default:"None" }} | diff --git a/src/registrar/templatetags/custom_filters.py b/src/registrar/templatetags/custom_filters.py index 9fa5c9aa9..bbed7b57c 100644 --- a/src/registrar/templatetags/custom_filters.py +++ b/src/registrar/templatetags/custom_filters.py @@ -67,3 +67,9 @@ def get_organization_long_name(generic_org_type): @register.filter(name="has_permission") def has_permission(user, permission): return user.has_perm(permission) + + +@register.filter(name='reverse_list') +def reverse_list(value): + return reversed(value) + From 909a9689f8db61b83c9884207ce335c96af2837f Mon Sep 17 00:00:00 2001 From: Rachid Mrad') - self.assertContains(response, " | None | ") + # Table will contain one row for Started self.assertContains(response, "Started | ", count=1) self.assertNotContains(response, "Submitted | ") @@ -921,11 +920,63 @@ class TestDomainRequestAdmin(MockEppLib): follow=True, ) - # Table will contain From None To Started - # Table will contain From Started To Submitted - self.assertContains(response, "None | ") - self.assertContains(response, "Started | ", count=2) - self.assertContains(response, "Submitted | ") + # Table will contain and extra row for Submitted + self.assertContains(response, "Started | ", count=1) + self.assertContains(response, "Submitted | ", count=1) + + domain_request.in_review() + domain_request.save() + + response = self.client.get( + "/admin/registrar/domainrequest/{}/change/".format(domain_request.pk), + follow=True, + ) + + # Table will contain and extra row for In review + self.assertContains(response, "Started | ", count=1) + self.assertContains(response, "Submitted | ", count=1) + self.assertContains(response, "In review | ", count=1) + + domain_request.action_needed() + domain_request.save() + + response = self.client.get( + "/admin/registrar/domainrequest/{}/change/".format(domain_request.pk), + follow=True, + ) + + # Table will contain and extra row for Action needed + self.assertContains(response, "Started | ", count=1) + self.assertContains(response, "Submitted | ", count=1) + self.assertContains(response, "In review | ", count=1) + self.assertContains(response, "Action needed | ", count=1) + + domain_request.in_review() + domain_request.save() + + response = self.client.get( + "/admin/registrar/domainrequest/{}/change/".format(domain_request.pk), + follow=True, + ) + + # Define the expected sequence of status changes + expected_status_changes = [ + "Started | ", + "Submitted | ", + "In review | ", + "Action needed | ", + "In review | ", + ] + + # Test for the order of status changes + for status_change in expected_status_changes: + self.assertContains(response, status_change, html=True) + + # Table now contains 2 rows for Approved + self.assertContains(response, "Started | ", count=1) + self.assertContains(response, "Submitted | ", count=1) + self.assertContains(response, "In review | ", count=2) + self.assertContains(response, "Action needed | ", count=1) @less_console_noise_decorator def test_analyst_can_see_and_edit_alternative_domain(self): From edd74809215ccf74952276cf6c3f36e97e9521f9 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Fri, 26 Apr 2024 08:41:33 -0600 Subject: [PATCH 14/88] Update _admin.scss --- src/registrar/assets/sass/_theme/_admin.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/registrar/assets/sass/_theme/_admin.scss b/src/registrar/assets/sass/_theme/_admin.scss index 1813b0acc..99bf2017a 100644 --- a/src/registrar/assets/sass/_theme/_admin.scss +++ b/src/registrar/assets/sass/_theme/_admin.scss @@ -634,9 +634,9 @@ div.dja__model-description{ list-style-type: disc; } -} + &.dja__model-description--no-overflow { + display: block; + overflow: unset; + } -div.dja__model-description.dja__model-description--no-overflow { - display: block; - overflow: unset; } From 8ed59d9bc8693511d981d094c00f14d520531061 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Fri, 26 Apr 2024 08:43:25 -0600 Subject: [PATCH 15/88] Update admin.py --- src/registrar/admin.py | 43 ------------------------------------------ 1 file changed, 43 deletions(-) diff --git a/src/registrar/admin.py b/src/registrar/admin.py index e2e3fb35b..42d73f10d 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -382,49 +382,6 @@ class AdminSortFields: class AuditedAdmin(admin.ModelAdmin): """Custom admin to make auditing easier.""" - # TODO - move this into a helper somewhere, maybe an enum? - model_descriptions = { - 'domainrequest': ( - "This table contains all domain requests that have been started within the registrar and the " - "status of those requests. " - "Updating values here will immediately update the corresponding values that users see in the registrar. " - "Once a domain request has been adjudicated, the details of that request should not be modified. " - "To update attributes (like an organization’s name) after a domain’s approval, go to Domains. " - "Similar fields display on each Domain page, but edits made there will not affect the corresponding domain request." - ), - "contact": ( - "Contacts include anyone who has access to the registrar (known as “users”) and anyone listed in a domain request, " - "including other employees and authorizing officials. " - "Only contacts who have access to the registrar will have a corresponding record within the " - "Users table." - # TODO - change this - "Federal | ', count=1) # Now let's make sure the long description does not exist @@ -1200,7 +1200,7 @@ class TestDomainRequestAdmin(MockEppLib): response = self.client.get("/admin/registrar/domainrequest/?generic_org_type__exact=federal") # There are 2 template references to Federal (4) and two in the results data # of the request - self.assertContains(response, "Federal", count=34) + self.assertContains(response, "Federal", count=37) # This may be a bit more robust self.assertContains(response, 'Federal | ', count=1) # Now let's make sure the long description does not exist @@ -2470,7 +2470,7 @@ class TestDomainInvitationAdmin(TestCase): ) # Assert that the filters are added - self.assertContains(response, "invited", count=2) + self.assertContains(response, "invited", count=4) self.assertContains(response, "Invited", count=2) self.assertContains(response, "retrieved", count=2) self.assertContains(response, "Retrieved", count=2) @@ -3845,7 +3845,7 @@ class TestFederalAgency(TestCase): # Test for a description snippet self.assertContains(response, "This table does not have a description yet.") - self.assertNotContains(response, "Show more") + self.assertContains(response, "Show more") class TestPublicContact(TestCase): From e1755578c4ca2163c86f91c8085688526a99195d Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Fri, 26 Apr 2024 10:57:22 -0600 Subject: [PATCH 21/88] Linting --- src/registrar/tests/test_admin.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py index 88f00bfcb..49848fd3a 100644 --- a/src/registrar/tests/test_admin.py +++ b/src/registrar/tests/test_admin.py @@ -27,7 +27,6 @@ from registrar.admin import ( PublicContactAdmin, TransitionDomainAdmin, UserGroupAdmin, - TransitionDomainAdmin, ) from registrar.models import ( Domain, From 1ea4b0b6f52f7a403aab958bd91d314706775e55 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Fri, 26 Apr 2024 11:54:54 -0600 Subject: [PATCH 22/88] auditlog -=> log entry --- src/registrar/templates/admin/model_descriptions.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/admin/model_descriptions.html b/src/registrar/templates/admin/model_descriptions.html index f87bf61ca..5599baf18 100644 --- a/src/registrar/templates/admin/model_descriptions.html +++ b/src/registrar/templates/admin/model_descriptions.html @@ -57,7 +57,7 @@ a corresponding record within the Users table. Updating someone’s contact information here will not affect that person’s Login.gov information. - {% elif opts.model_name == 'auditlog' %} + {% elif opts.model_name == 'logentry' %}
Federal | ', count=1) # Now let's make sure the long description does not exist @@ -1310,7 +1310,7 @@ class TestDomainRequestAdmin(MockEppLib): response = self.client.get("/admin/registrar/domainrequest/?generic_org_type__exact=federal") # There are 2 template references to Federal (4) and two in the results data # of the request - self.assertContains(response, "Federal", count=37) + self.assertContains(response, "Federal", count=40) # This may be a bit more robust self.assertContains(response, 'Federal | ', count=1) # Now let's make sure the long description does not exist From 59f9d6bfecac53b36a4058148ec569a798d5e775 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Fri, 3 May 2024 10:21:43 -0600 Subject: [PATCH 78/88] PR suggestions --- src/registrar/assets/sass/_theme/_admin.scss | 6 +++++- .../admin/includes/descriptions/contact_description.html | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/registrar/assets/sass/_theme/_admin.scss b/src/registrar/assets/sass/_theme/_admin.scss index c1f6571b9..b4e7c0cb2 100644 --- a/src/registrar/assets/sass/_theme/_admin.scss +++ b/src/registrar/assets/sass/_theme/_admin.scss @@ -685,7 +685,6 @@ div.dja__model-description{ p, li { font-size: medium; - line-height: 1.2em; } @media (prefers-color-scheme: light) { @@ -702,6 +701,7 @@ div.dja__model-description{ li { list-style-type: disc; + font-family: Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif; } &.dja__model-description--no-overflow { @@ -710,3 +710,7 @@ div.dja__model-description{ } } + +.text-underline { + text-decoration: underline !important; +} diff --git a/src/registrar/templates/django/admin/includes/descriptions/contact_description.html b/src/registrar/templates/django/admin/includes/descriptions/contact_description.html index c264f238f..18fb14568 100644 --- a/src/registrar/templates/django/admin/includes/descriptions/contact_description.html +++ b/src/registrar/templates/django/admin/includes/descriptions/contact_description.html @@ -3,5 +3,8 @@ Contacts include anyone who has access to the registrar (known as “users”) a including other employees and authorizing officials. Only contacts who have access to the registrar will have a corresponding record within the Users table. + + +