mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-05 09:21:54 +02:00
Modify existing
This commit is contained in:
parent
956e27cc77
commit
e017315638
4 changed files with 20 additions and 27 deletions
|
@ -26,23 +26,13 @@
|
|||
{% csrf_token %}
|
||||
|
||||
{% if generic_org_type == "federal" or generic_org_type == "tribal" %}
|
||||
{# If all fields are disabled, add SR content #}
|
||||
<div class="usa-sr-only" aria-labelledby="id_first_name" id="sr-so-first-name">{{ form.first_name.value }}</div>
|
||||
<div class="usa-sr-only" aria-labelledby="id_last_name" id="sr-so-last-name">{{ form.last_name.value }}</div>
|
||||
<div class="usa-sr-only" aria-labelledby="id_title" id="sr-so-title">{{ form.title.value }}</div>
|
||||
<div class="usa-sr-only" aria-labelledby="id_email" id="sr-so-email">{{ form.email.value }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% input_with_errors form.first_name %}
|
||||
|
||||
{% input_with_errors form.last_name %}
|
||||
|
||||
{% input_with_errors form.title %}
|
||||
|
||||
{% input_with_errors form.email %}
|
||||
|
||||
{% if generic_org_type != "federal" and generic_org_type != "tribal" %}
|
||||
<button type="submit" class="usa-button">Save</button>
|
||||
{% include "includes/readonly_senior_official.html" with form=form senior_official=senior_officialn%}
|
||||
{% else %}
|
||||
{% input_with_errors form.first_name %}
|
||||
{% input_with_errors form.last_name %}
|
||||
{% input_with_errors form.title %}
|
||||
{% input_with_errors form.email %}
|
||||
<button type="submit" class="usa-button">Save</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
{% endblock %} {# domain_content #}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
{% if form.full_name.value is not None %}
|
||||
{% include "includes/input_read_only.html" with field=form.full_name %}
|
||||
{% endif %}
|
||||
|
||||
{% if form.title.value is not None %}
|
||||
{% include "includes/input_read_only.html" with field=form.title %}
|
||||
{% endif %}
|
||||
|
||||
{% if form.email.value is not None %}
|
||||
{% include "includes/input_read_only.html" with field=form.email %}
|
||||
{% endif %}
|
|
@ -28,15 +28,7 @@
|
|||
{% if not senior_official %}
|
||||
<h4>No senior official was found for this portfolio.</h4>
|
||||
{% else %}
|
||||
{% if form.full_name.value is not None %}
|
||||
{% include "includes/input_read_only.html" with field=form.full_name %}
|
||||
{% endif %}
|
||||
{% if form.title.value is not None %}
|
||||
{% include "includes/input_read_only.html" with field=form.title %}
|
||||
{% endif %}
|
||||
{% if form.email.value is not None %}
|
||||
{% include "includes/input_read_only.html" with field=form.email %}
|
||||
{% endif %}
|
||||
{% include "includes/readonly_senior_official.html" with form=form %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
|
|
@ -48,7 +48,7 @@ class PortfolioOrganizationView(PortfolioBasePermissionView, FormMixin):
|
|||
def get_context_data(self, **kwargs):
|
||||
"""Add additional context data to the template."""
|
||||
context = super().get_context_data(**kwargs)
|
||||
# context["has_edit_org_portfolio_permission"]
|
||||
context["has_edit_org_portfolio_permission"] = self.request.user.has_edit_org_portfolio_permission()
|
||||
return context
|
||||
|
||||
def get_object(self, queryset=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue