diff --git a/main/forms.py b/main/forms.py index cdd5604a5a797d935ef50b0f84f43488c952d8ae..fca1d522c06d5ded99dcb64acd38bf5e9141bba0 100644 --- a/main/forms.py +++ b/main/forms.py @@ -169,6 +169,8 @@ class CareerSubmissionForm(forms.Form): personal_data_agreement = forms.BooleanField(required=True) + other_offers_agreement = forms.BooleanField(required=False) + class JekyllImportForm(SharedJekyllImportForm): def handle_import(self): diff --git a/main/models.py b/main/models.py index 574d01151bbc95367cea1b2f2cb5b6eedfdea5de..eece3ce8e0ec1ec87125b92d74f58b149329d463 100644 --- a/main/models.py +++ b/main/models.py @@ -122,7 +122,7 @@ class MainHomePage(MainHomePageMixin): menu_panels = MainHomePageMixin.menu_panels + [ FieldPanel("popout_button_name"), - FieldPanel("popout_button_content") + FieldPanel("popout_button_content"), ] edit_handler = TabbedInterface( @@ -604,7 +604,11 @@ class MainCareerPage( current_time = datetime.now() current_date = current_time.date() - if request.method == "POST" and self.closing_date > current_date and self.submission_end_date > current_date: + if ( + request.method == "POST" + and self.closing_date > current_date + and self.submission_end_date > current_date + ): form = CareerSubmissionForm(request.POST, request.FILES) if form.is_valid(): @@ -627,6 +631,7 @@ Vyplněné údaje: Příjmení: {form.cleaned_data['surname']} E-mail: {form.cleaned_data['email']} Telefon: {form.cleaned_data['phone']} + Chce posílat další nabídky: {'Ano' if form.cleaned_data['other_offers_agreement'] else 'Ne'} Vlastní text: {form.cleaned_data['own_text'] if form.cleaned_data['own_text'] else '(nevyplněn)'} CV, motivační dopis a ostatní soubory jsou v přílohách. Názvy souborů: diff --git a/main/templates/main/main_career_page.html b/main/templates/main/main_career_page.html index ec22f71c03bd1af450c81b3cb15cdc63f9593451..c77620a3fc00acd76fb21b14c44edfefd6937844 100644 --- a/main/templates/main/main_career_page.html +++ b/main/templates/main/main_career_page.html @@ -157,6 +157,14 @@ for="id_personal_data_agreement" >Souhlasím se zpracováním osobním údajů (povinné)</label> </section> + + <section class="flex flex-row gap-3 items-start leading-6"> + <div class="shrink-0">{{ form.other_offers_agreement }}</div> + + <label + for="id_other_offers_agreement" + >Souhlasím, aby mi z České pirátské strany, IČO 71339698, Na Moráni 360/3, Praha, Nové Město, dali vědět, pokud pro mě budou mít jinou vhodnou pozici. (nepovinné)</label> + </section> </div> </main> <footer