-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2515 from cisagov/rjm/2505-org-view-only
Issue #2505: Read-only view for portfolio org page - [RJM]
- Loading branch information
Showing
14 changed files
with
171 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% comment %} | ||
Template include for read-only form fields | ||
{% endcomment %} | ||
|
||
|
||
<h4 class="read-only-label">{{ field.label }}</h4> | ||
<p class="read-only-value">{{ field.value }}</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,42 +23,53 @@ <h1>Organization</h1> | |
|
||
<p>The name of your federal agency will be publicly listed as the domain registrant.</p> | ||
|
||
<p> | ||
The federal agency for your organization can’t be updated here. | ||
To suggest an update, email <a href="mailto:[email protected]" class="usa-link">[email protected]</a>. | ||
</p> | ||
|
||
{% include "includes/form_errors.html" with form=form %} | ||
|
||
{% include "includes/required_fields.html" %} | ||
|
||
<form class="usa-form usa-form--large" method="post" novalidate id="form-container"> | ||
{% csrf_token %} | ||
|
||
{% if has_edit_org_portfolio_permission %} | ||
<p> | ||
<strong class="text-primary display-block margin-bottom-1">Federal agency</strong> | ||
{{ portfolio }} | ||
The federal agency for your organization can’t be updated here. | ||
To suggest an update, email <a href="mailto:[email protected]" class="usa-link">[email protected]</a>. | ||
</p> | ||
|
||
{% input_with_errors form.address_line1 %} | ||
|
||
{% input_with_errors form.address_line2 %} | ||
|
||
{% input_with_errors form.city %} | ||
|
||
{% input_with_errors form.state_territory %} | ||
|
||
{% with add_class="usa-input--small" %} | ||
{% input_with_errors form.zipcode %} | ||
{% endwith %} | ||
{% include "includes/form_errors.html" with form=form %} | ||
{% include "includes/required_fields.html" %} | ||
<form class="usa-form usa-form--large" method="post" novalidate> | ||
{% csrf_token %} | ||
<h4 class="read-only-label">Federal agency</h4> | ||
<p class="read-only-value"> | ||
{{ portfolio.federal_agency }} | ||
</p> | ||
{% input_with_errors form.address_line1 %} | ||
{% input_with_errors form.address_line2 %} | ||
{% input_with_errors form.city %} | ||
{% input_with_errors form.state_territory %} | ||
{% with add_class="usa-input--small" %} | ||
{% input_with_errors form.zipcode %} | ||
{% endwith %} | ||
<button type="submit" class="usa-button"> | ||
Save | ||
</button> | ||
</form> | ||
{% else %} | ||
<h4 class="read-only-label">Federal agency</h4> | ||
<p class="read-only-value"> | ||
{{ portfolio.federal_agency }} | ||
</p> | ||
{% if form.address_line1.value is not None %} | ||
{% include "includes/input_read_only.html" with field=form.address_line1 %} | ||
{% endif %} | ||
{% if form.address_line2.value is not None %} | ||
{% include "includes/input_read_only.html" with field=form.address_line2 %} | ||
{% endif %} | ||
{% if form.city.value is not None %} | ||
{% include "includes/input_read_only.html" with field=form.city %} | ||
{% endif %} | ||
{% if form.state_territory.value is not None %} | ||
{% include "includes/input_read_only.html" with field=form.state_territory %} | ||
{% endif %} | ||
{% if form.zipcode.value is not None %} | ||
{% include "includes/input_read_only.html" with field=form.zipcode %} | ||
{% endif %} | ||
{% endif %} | ||
|
||
<button | ||
type="submit" | ||
class="usa-button" | ||
> | ||
Save | ||
</button> | ||
</form> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.