Skip to content

Commit

Permalink
Update content
Browse files Browse the repository at this point in the history
  • Loading branch information
CamLamb committed Sep 13, 2023
1 parent 1696ef2 commit 96fc833
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Generated by Django 4.1.10 on 2023-09-13 14:47

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("peoplefinder", "0110_person_contact_email"),
]

operations = [
migrations.AlterField(
model_name="person",
name="contact_email",
field=models.EmailField(
blank=True,
help_text="The work email you want people to contact you on.",
max_length=254,
null=True,
verbose_name="Email address",
),
),
migrations.AlterField(
model_name="person",
name="primary_phone_number",
field=models.CharField(
blank=True,
help_text="Enter the country's dialling code in place of the first 0. The UK's dialling code is +44.",
max_length=42,
null=True,
verbose_name="Phone number",
),
),
migrations.AlterField(
model_name="person",
name="secondary_phone_number",
field=models.CharField(
blank=True,
help_text="Enter the country's dialling code in place of the first 0. The UK's dialling code is +44.",
max_length=160,
null=True,
verbose_name="Alternative phone number",
),
),
]
23 changes: 12 additions & 11 deletions src/peoplefinder/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,29 +577,30 @@ class RemoteWorking(models.TextChoices):
blank=True,
)
contact_email = models.EmailField(
"Preferred email address",
"Email address",
null=True,
blank=True,
help_text=(
"Complete if you want to show a different email address on your"
" profile for example a jobshare or Private Office mailbox. Do not"
" enter a personal email address, or work email address that is not"
" safe for official information."
),
help_text="The work email you want people to contact you on.",
)
primary_phone_number = models.CharField(
"Contact number",
"Phone number",
max_length=42,
null=True,
blank=True,
help_text="Include your country dialling code.",
help_text=(
"Enter the country's dialling code in place of the first 0. The"
" UK's dialling code is +44."
),
)
secondary_phone_number = models.CharField(
"Alternative contact number",
"Alternative phone number",
max_length=160,
null=True,
blank=True,
help_text="Include your country dialling code.",
help_text=(
"Enter the country's dialling code in place of the first 0. The"
" UK's dialling code is +44."
),
)
town_city_or_region = models.CharField(
"Town, city or region",
Expand Down
6 changes: 4 additions & 2 deletions src/peoplefinder/services/person.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ class PersonService:
ProfileSections.CONTACT: {
"edit_section": EditSections.CONTACT,
"fields": [
("contact_email", "Preferred email"),
("primary_phone_number", "Contact number"),
("contact_email", "Email"),
("primary_phone_number", "Phone number"),
("secondary_phone_number", "Alternative phone number"),
],
},
ProfileSections.ROLE: {
Expand Down Expand Up @@ -216,6 +217,7 @@ def create_user_profile(self, user: User) -> Person:
preferred_first_name=user.first_name,
last_name=user.last_name,
email=user.email,
contact_email=user.email,
login_count=1,
)

Expand Down
6 changes: 3 additions & 3 deletions src/peoplefinder/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ class ProfileSections(models.TextChoices):


class EditSections(models.TextChoices):
PERSONAL = "personal", "Personal Details"
CONTACT = "contact", "Contact Details"
PERSONAL = "personal", "Personal details"
CONTACT = "contact", "Contact details"
TEAMS = "teams", "Team and role"
LOCATION = "location", "Location and working patterns"
SKILLS = "skills", "Skills, Networks and Interests"
SKILLS = "skills", "Skills, networks and interests"
ADMIN = "admin", "Administer profile"
2 changes: 1 addition & 1 deletion src/peoplefinder/views/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def get_context_data(self, **kwargs):
edit_sections.remove(EditSections.ADMIN)

context.update(
page_title=f"Edit profile: {self.edit_section.label}",
page_title=f"Edit profile: {self.edit_section.label.lower()}",
current_edit_section=self.edit_section,
edit_sections=edit_sections,
profile_slug=profile.slug,
Expand Down

0 comments on commit 96fc833

Please sign in to comment.