Skip to content

Commit

Permalink
external link is required if tender is tender kind
Browse files Browse the repository at this point in the history
  • Loading branch information
madjid-asa committed Oct 31, 2023
1 parent cda35c8 commit c122b3a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lemarche/www/tenders/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ def __init__(self, kind, questions_list=None, *args, **kwargs):
if self.kind != tender_constants.KIND_TENDER:
self.fields["external_link"].label = "Lien à partager"
self.fields["external_link"].help_text = None

if self.kind == tender_constants.KIND_TENDER:
self.fields["external_link"].required = True

self.fields["amount"].label = "Montant € estimé de votre besoin"
self.fields["accept_share_amount"].label = self.fields["accept_share_amount"].help_text
self.fields["external_link"].widget.attrs["placeholder"] = "https://www.example.fr"
Expand Down

0 comments on commit c122b3a

Please sign in to comment.