mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-31 23:16:36 +02:00
static content on invitation and permissions change forms
This commit is contained in:
parent
5cb6c3f0fb
commit
d2343b710e
4 changed files with 32 additions and 13 deletions
|
@ -1300,6 +1300,8 @@ class UserPortfolioPermissionAdmin(ListHeaderAdmin):
|
||||||
search_fields = ["user__first_name", "user__last_name", "user__email", "portfolio__organization_name"]
|
search_fields = ["user__first_name", "user__last_name", "user__email", "portfolio__organization_name"]
|
||||||
search_help_text = "Search by first name, last name, email, or portfolio."
|
search_help_text = "Search by first name, last name, email, or portfolio."
|
||||||
|
|
||||||
|
change_form_template = "django/admin/user_portfolio_permission_change_form.html"
|
||||||
|
|
||||||
def get_roles(self, obj):
|
def get_roles(self, obj):
|
||||||
readable_roles = obj.get_readable_roles()
|
readable_roles = obj.get_readable_roles()
|
||||||
return ", ".join(readable_roles)
|
return ", ".join(readable_roles)
|
||||||
|
@ -1456,7 +1458,7 @@ class PortfolioInvitationAdmin(ListHeaderAdmin):
|
||||||
|
|
||||||
autocomplete_fields = ["portfolio"]
|
autocomplete_fields = ["portfolio"]
|
||||||
|
|
||||||
change_form_template = "django/admin/email_clipboard_change_form.html"
|
change_form_template = "django/admin/portfolio_invitation_change_form.html"
|
||||||
|
|
||||||
# Select portfolio invitations to change -> Portfolio invitations
|
# Select portfolio invitations to change -> Portfolio invitations
|
||||||
def changelist_view(self, request, extra_context=None):
|
def changelist_view(self, request, extra_context=None):
|
||||||
|
|
|
@ -47,3 +47,8 @@
|
||||||
background-color: color('base-darkest');
|
background-color: color('base-darkest');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Override the specificity of USWDS css to enable no max width on admin alerts
|
||||||
|
.usa-alert__body.maxw-none {
|
||||||
|
max-width: none;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
{% extends 'django/admin/email_clipboard_change_form.html' %}
|
||||||
|
{% load custom_filters %}
|
||||||
|
{% load i18n static %}
|
||||||
|
|
||||||
|
{% block content_subtitle %}
|
||||||
|
<div class="usa-alert usa-alert--info usa-alert--slim">
|
||||||
|
<div class="usa-alert__body margin-left-1 maxw-none">
|
||||||
|
<p class="usa-alert__text maxw-none">
|
||||||
|
If you add someone to a portfolio here, it will trigger an invitation email when you click "save." If you don't want to trigger an email, use the <a class="usa-link" href="{% url 'admin:registrar_userportfoliopermission_changelist' %}">User portfolio permissions table</a> instead.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ block.super }}
|
||||||
|
{% endblock %}
|
|
@ -2,15 +2,13 @@
|
||||||
{% load custom_filters %}
|
{% load custom_filters %}
|
||||||
{% load i18n static %}
|
{% load i18n static %}
|
||||||
|
|
||||||
{% block field_sets %}
|
{% block content_subtitle %}
|
||||||
{% for fieldset in adminform %}
|
<div class="usa-alert usa-alert--info usa-alert--slim">
|
||||||
{% comment %}
|
<div class="usa-alert__body margin-left-1 maxw-none">
|
||||||
This is a placeholder for now.
|
<p class="usa-alert__text maxw-none">
|
||||||
|
If you add someone to a portfolio here, it will not trigger an invitation email. To trigger an email, use the <a class="usa-link" href="{% url 'admin:registrar_portfolioinvitation_changelist' %}">Portfolio invitations table</a> instead.
|
||||||
Disclaimer:
|
</p>
|
||||||
When extending the fieldset view consider whether you need to make a new one that extends from detail_table_fieldset.
|
</div>
|
||||||
detail_table_fieldset is used on multiple admin pages, so a change there can have unintended consequences.
|
</div>
|
||||||
{% endcomment %}
|
{{ block.super }}
|
||||||
{% include "django/admin/includes/user_portfolio_permission_fieldset.html" with original_object=original %}
|
{% endblock %}
|
||||||
{% endfor %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue