Skip to content

Commit

Permalink
fix: GPS wording
Browse files Browse the repository at this point in the history
  • Loading branch information
vjousse committed May 29, 2024
1 parent b66e4f2 commit dc4475a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion itou/www/apply/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@


class JobSeekerExistsForm(forms.Form):
def __init__(self, *args, **kwargs):
def __init__(self, is_gps=False, *args, **kwargs):
super().__init__(*args, **kwargs)
self.user = None

if is_gps:
self.fields["email"].label = "Adresse e-mail du bénéficiaire"

email = forms.EmailField(
label="Adresse e-mail du candidat",
widget=forms.EmailInput(attrs={"autocomplete": "off", "placeholder": "julie@example.com"}),
Expand Down
4 changes: 3 additions & 1 deletion itou/www/apply/views/submit_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,9 @@ def __init__(self):
def setup(self, request, *args, **kwargs):
self.job_seeker_session = SessionNamespace(request.session, kwargs["session_uuid"])
super().setup(request, *args, **kwargs)
self.form = JobSeekerExistsForm(initial=self.job_seeker_session.get("user", {}), data=request.POST or None)
self.form = JobSeekerExistsForm(
is_gps=self.is_gps, initial=self.job_seeker_session.get("user", {}), data=request.POST or None
)

def post(self, request, *args, **kwargs):
can_add_nir = False
Expand Down

0 comments on commit dc4475a

Please sign in to comment.