From f91b8cdd91ce7ffd2123736522b0a33128c3fe18 Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Mon, 20 May 2024 16:00:58 -0400 Subject: [PATCH] fix url --- src/registrar/forms/user_profile.py | 1 - src/registrar/templates/domain_detail.html | 1 + src/registrar/templates/domain_sidebar.html | 2 +- .../templates/includes/input_with_errors.html | 8 ++++---- src/registrar/templates/profile.html | 16 +++++++++------- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/registrar/forms/user_profile.py b/src/registrar/forms/user_profile.py index 036b03751..31e26a5a6 100644 --- a/src/registrar/forms/user_profile.py +++ b/src/registrar/forms/user_profile.py @@ -55,6 +55,5 @@ class UserProfileForm(forms.ModelForm): "required": "Enter your email address in the required format, like name@example.com." } self.fields["phone"].error_messages["required"] = "Enter your phone number." - self.domainInfo = None DomainHelper.disable_field(self.fields["email"], disable_required=True) diff --git a/src/registrar/templates/domain_detail.html b/src/registrar/templates/domain_detail.html index 67837196f..815df4942 100644 --- a/src/registrar/templates/domain_detail.html +++ b/src/registrar/templates/domain_detail.html @@ -59,6 +59,7 @@ {% url 'domain-authorizing-official' pk=domain.id as url %} {% include "includes/summary_item.html" with title='Authorizing official' value=domain.domain_info.authorizing_official contact='true' edit_link=url editable=domain.is_editable %} + {# Conditionally display profile #} {% if not has_profile_feature_flag %} {% url 'domain-your-contact-information' pk=domain.id as url %} {% include "includes/summary_item.html" with title='Your contact information' value=request.user.contact contact='true' edit_link=url editable=domain.is_editable %} diff --git a/src/registrar/templates/domain_sidebar.html b/src/registrar/templates/domain_sidebar.html index f99cfd0cf..5739d0417 100644 --- a/src/registrar/templates/domain_sidebar.html +++ b/src/registrar/templates/domain_sidebar.html @@ -74,7 +74,7 @@ {% if not has_profile_feature_flag %} - {% comment %}Conditionally display profile link in main nav{% endcomment %} + {# Conditionally display profile link in main nav #}
  • {% url 'domain-your-contact-information' pk=domain.id as url %} - {% comment %} If the link_text appears more than once, the first instance will be a link and the other instances will be ignored {% endcomment %} + {# If the link_text appears more than once, the first instance will be a link and the other instances will be ignored #} {% if link_text and link_text in sublabel_text %} {% with link_index=sublabel_text|find_index:link_text %} {{ sublabel_text|slice:link_index }} - {% comment %} HTML will convert a new line into a space, resulting with a space before the fullstop in case link_text is at the end of sublabel_text, hence the unfortunate line below {% endcomment %} - {{ link_text }}{% with sublabel_part_after=sublabel_text|slice_after:link_text %}{{ sublabel_part_after }}{% endwith %} + {# HTML will convert a new line into a space, resulting with a space before the fullstop in case link_text is at the end of sublabel_text, hence the unfortunate line below #} + {{ link_text }}{% with sublabel_part_after=sublabel_text|slice_after:link_text %}{{ sublabel_part_after }}{% endwith %} {% endwith %} {% else %} {{ sublabel_text }} @@ -76,7 +76,7 @@ error messages, if necessary. {% endif %} -{% if widget.attrs.maxlength and do_not_show_max_chars == "false" %} +{% if widget.attrs.maxlength and not do_not_show_max_chars %}