From ff20d5e45be992886519a10a447a533995860b6c Mon Sep 17 00:00:00 2001 From: Daniel Ursache Dogariu Date: Thu, 21 Nov 2024 15:40:56 +0200 Subject: [PATCH] Fix candidate declaration field details --- .../0075_alter_candidate_statement.py | 27 ++++++++++++ backend/hub/models.py | 2 +- backend/locale/en/LC_MESSAGES/django.po | 37 ++++++++-------- backend/locale/ro/LC_MESSAGES/django.po | 44 ++++++++++--------- 4 files changed, 70 insertions(+), 40 deletions(-) create mode 100644 backend/hub/migrations/0075_alter_candidate_statement.py diff --git a/backend/hub/migrations/0075_alter_candidate_statement.py b/backend/hub/migrations/0075_alter_candidate_statement.py new file mode 100644 index 00000000..21a92561 --- /dev/null +++ b/backend/hub/migrations/0075_alter_candidate_statement.py @@ -0,0 +1,27 @@ +# Generated by Django 4.2.16 on 2024-11-21 13:40 + +from django.db import migrations, models +import hub.models + + +class Migration(migrations.Migration): + + dependencies = [ + ("hub", "0074_alter_candidate_status_alter_featureflag_flag"), + ] + + operations = [ + migrations.AlterField( + model_name="candidate", + name="statement", + field=models.FileField( + blank=True, + help_text="Declaration of the designated representative stating that he/she is not a member of the leadership of a political party, has not been elected to a public office and is not a dignitary of the Romanian state, has no criminal record.", + max_length=300, + null=True, + upload_to="", + validators=[hub.models.file_validator], + verbose_name="Representative statement", + ), + ), + ] diff --git a/backend/hub/models.py b/backend/hub/models.py index e158b266..97cd942d 100644 --- a/backend/hub/models.py +++ b/backend/hub/models.py @@ -762,7 +762,7 @@ class Candidate(StatusModel, TimeStampedModel, BaseCompleteModel): help_text=_( "Declaration of the designated representative stating that he/she is not a member " "of the leadership of a political party, has not been elected to a public office " - "and is not a dignitary of the Romanian state." + "and is not a dignitary of the Romanian state, has no criminal record." ), validators=[file_validator], ) diff --git a/backend/locale/en/LC_MESSAGES/django.po b/backend/locale/en/LC_MESSAGES/django.po index 35df642e..bf7dff87 100644 --- a/backend/locale/en/LC_MESSAGES/django.po +++ b/backend/locale/en/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-20 20:41+0200\n" +"POT-Creation-Date: 2024-11-21 15:39+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -584,7 +584,7 @@ msgstr "" msgid "I agree to the {terms_url} of the VotONG platform" msgstr "" -#: hub/forms.py:108 hub/forms.py:226 hub/views.py:503 +#: hub/forms.py:108 hub/forms.py:227 hub/views.py:503 msgid "An organization with the same email address is already registered." msgstr "" @@ -596,39 +596,39 @@ msgstr "" msgid "Organization already exists." msgstr "" -#: hub/forms.py:239 +#: hub/forms.py:240 msgid "Voting domain cannot be changed. Please contact the site administrator." msgstr "" -#: hub/forms.py:335 +#: hub/forms.py:336 msgid "" "To add a candidate you must upload all required documents in 'Organization " "Profile'" msgstr "" -#: hub/forms.py:339 +#: hub/forms.py:340 msgid "Please add all candidate fields" msgstr "" -#: hub/forms.py:373 +#: hub/forms.py:374 msgid "Candidate registration is closed." msgstr "" -#: hub/forms.py:380 +#: hub/forms.py:381 msgid "" "You cannot edit a candidate that is not proposed and outside of the " "candidate confirmation period." msgstr "" -#: hub/forms.py:395 +#: hub/forms.py:396 msgid "[ERROR 32202] Please contact the site administrator." msgstr "" -#: hub/forms.py:401 +#: hub/forms.py:402 msgid "CSV file" msgstr "" -#: hub/forms.py:406 +#: hub/forms.py:407 msgid "Uploaded file is not a CSV file" msgstr "" @@ -987,7 +987,8 @@ msgstr "Candidate statement" msgid "" "Declaration of the designated representative stating that he/she is not a " "member of the leadership of a political party, has not been elected to a " -"public office and is not a dignitary of the Romanian state." +"public office and is not a dignitary of the Romanian state, has no criminal " +"record." msgstr "" #: hub/models.py:770 hub/templates/hub/candidate/detail.html:138 @@ -1708,35 +1709,35 @@ msgstr "" msgid "You must write a rejection message." msgstr "" -#: hub/views.py:739 +#: hub/views.py:751 msgid "The candidate has been proposed and is gathering the necessary support." msgstr "" -#: hub/views.py:743 +#: hub/views.py:755 msgid "" "The candidate has been approved by the admins and is waiting for validation." msgstr "" -#: hub/views.py:747 +#: hub/views.py:759 msgid "" "The candidate has been validated by the electoral commission and can be " "voted." msgstr "" -#: hub/views.py:751 +#: hub/views.py:763 msgid "" "The candidate has been rejected by the admins or the electoral commission." msgstr "" -#: hub/views.py:824 +#: hub/views.py:836 msgid "User is not authenticated." msgstr "" -#: hub/views.py:829 +#: hub/views.py:841 msgid "Authenticated user does not have an organization." msgstr "" -#: hub/views.py:1072 +#: hub/views.py:1084 #, python-format msgid "Please wait %(minutes_threshold)s minutes before updating again." msgstr "" diff --git a/backend/locale/ro/LC_MESSAGES/django.po b/backend/locale/ro/LC_MESSAGES/django.po index 557256a5..62add4a3 100644 --- a/backend/locale/ro/LC_MESSAGES/django.po +++ b/backend/locale/ro/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-20 20:41+0200\n" +"POT-Creation-Date: 2024-11-21 15:39+0200\n" "PO-Revision-Date: 2020-04-23 17:54+0300\n" "Last-Translator: \n" "Language-Team: \n" @@ -601,7 +601,7 @@ msgstr "Termeni și condiții" msgid "I agree to the {terms_url} of the VotONG platform" msgstr "Sunt de acord cu {terms_url} ale platformei VotONG" -#: hub/forms.py:108 hub/forms.py:226 hub/views.py:503 +#: hub/forms.py:108 hub/forms.py:227 hub/views.py:503 msgid "An organization with the same email address is already registered." msgstr "O organizație cu aceeași adresă de email este deja înregistrată." @@ -613,13 +613,13 @@ msgstr "Trebuie să acceptați termenii și condițiile de utilizare" msgid "Organization already exists." msgstr "Organizația există deja." -#: hub/forms.py:239 +#: hub/forms.py:240 msgid "Voting domain cannot be changed. Please contact the site administrator." msgstr "" "Domeniul de votare nu poate fi schimbat. Contactați administratorul site-" "ului." -#: hub/forms.py:335 +#: hub/forms.py:336 msgid "" "To add a candidate you must upload all required documents in 'Organization " "Profile'" @@ -627,15 +627,15 @@ msgstr "" "Pentru a adăuga o candidatură trebuie să încarci toate documentele necesare " "în 'Profilul Organizației'" -#: hub/forms.py:339 +#: hub/forms.py:340 msgid "Please add all candidate fields" msgstr "Vă rugăm completați toate câmpurile candidaturii" -#: hub/forms.py:373 +#: hub/forms.py:374 msgid "Candidate registration is closed." msgstr "Înregistrarea candidaților este închisă." -#: hub/forms.py:380 +#: hub/forms.py:381 msgid "" "You cannot edit a candidate that is not proposed and outside of the " "candidate confirmation period." @@ -643,15 +643,15 @@ msgstr "" "Nu puteți edita un candidat care nu este propus și în afara perioadei de " "confirmare a candidaturii." -#: hub/forms.py:395 +#: hub/forms.py:396 msgid "[ERROR 32202] Please contact the site administrator." msgstr "[EROARE 32202] Contactați administratorul site-ului." -#: hub/forms.py:401 +#: hub/forms.py:402 msgid "CSV file" msgstr "Fișier CSV" -#: hub/forms.py:406 +#: hub/forms.py:407 msgid "Uploaded file is not a CSV file" msgstr "Fișierul încărcat nu e de tip CSV" @@ -1022,11 +1022,13 @@ msgstr "Declarație candidat" msgid "" "Declaration of the designated representative stating that he/she is not a " "member of the leadership of a political party, has not been elected to a " -"public office and is not a dignitary of the Romanian state." +"public office and is not a dignitary of the Romanian state, has no criminal " +"record." msgstr "" -"Declarație pe propria răspundere a reprezentantului desemnat prin care " -"declară că nu este membru al conducerii unui partid politic, nu a fost ales " -"într-o funcție publică și nu este demnitar al statului român." +"Declarație pe propria răspundere privind îndeplinirea următoarelor condiții: " +"neapartenență politică, nu deține funcții de demnitate publică la nivel " +"local sau central și nu este angajat al unei instituții sau autorități " +"publice, nu are antecedente penale." #: hub/models.py:770 hub/templates/hub/candidate/detail.html:138 msgid "Mandate" @@ -1778,35 +1780,35 @@ msgstr "" msgid "You must write a rejection message." msgstr "Trebuie să completați un motiv de respingere." -#: hub/views.py:739 +#: hub/views.py:751 msgid "The candidate has been proposed and is gathering the necessary support." msgstr "Candidatura a fost propusă și strânge susțineri" -#: hub/views.py:743 +#: hub/views.py:755 msgid "" "The candidate has been approved by the admins and is waiting for validation." msgstr "Candidatura a fost trimisă spre validare Comisiei Electorale" -#: hub/views.py:747 +#: hub/views.py:759 msgid "" "The candidate has been validated by the electoral commission and can be " "voted." msgstr "Candidatura a fost validată de Comisia Electorală și poate fi votată" -#: hub/views.py:751 +#: hub/views.py:763 msgid "" "The candidate has been rejected by the admins or the electoral commission." msgstr "Candidatura a fost respinsă" -#: hub/views.py:824 +#: hub/views.py:836 msgid "User is not authenticated." msgstr "Utilizatorul nu este autentificat." -#: hub/views.py:829 +#: hub/views.py:841 msgid "Authenticated user does not have an organization." msgstr "Utilizatorul autentificat nu are o organizație." -#: hub/views.py:1072 +#: hub/views.py:1084 #, python-format msgid "Please wait %(minutes_threshold)s minutes before updating again." msgstr ""