From 11e8d42f0e8b1077ad56b72f12fa8ad38f906b13 Mon Sep 17 00:00:00 2001 From: Tudor Amariei Date: Thu, 8 Jan 2026 13:51:52 +0200 Subject: [PATCH 1/2] feat: enhance cause visibility options and update related translations --- backend/donations/forms/ngo_account.py | 3 +- backend/locale/en/LC_MESSAGES/django.po | 30 ++++++++++------ backend/locale/hy/LC_MESSAGES/django.po | 30 ++++++++++------ backend/locale/ro/LC_MESSAGES/django.po | 34 +++++++++++++------ .../templates/v2/ngo-account/cause/form.html | 19 ++++++----- 5 files changed, 72 insertions(+), 44 deletions(-) diff --git a/backend/donations/forms/ngo_account.py b/backend/donations/forms/ngo_account.py index d04d0abb..f77fd68b 100644 --- a/backend/donations/forms/ngo_account.py +++ b/backend/donations/forms/ngo_account.py @@ -8,7 +8,7 @@ import utils.constants.memory from donations.common.validation.validate_slug import NgoSlugValidator from donations.models.byof import OwnFormsUpload -from donations.models.ngos import Cause, CauseVisibilityChoices, Ngo, ngo_slug_validator +from donations.models.ngos import Cause, Ngo, ngo_slug_validator from utils.text.phone_number import validate_phone_number @@ -132,7 +132,6 @@ def save(self, commit=True): if self.for_main_cause: cause.is_main = True - cause.visibility = CauseVisibilityChoices.PUBLIC if commit: cause.save() diff --git a/backend/locale/en/LC_MESSAGES/django.po b/backend/locale/en/LC_MESSAGES/django.po index f3200ebc..3f03f5bb 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: 2025-12-18 13:43+0200\n" +"POT-Creation-Date: 2026-01-08 13:23+0200\n" "PO-Revision-Date: 2025-03-27 14:48+0000\n" "Last-Translator: Andrei Ioniță \n" "Language-Team: English \n" "Language-Team: Armenian \n" "Language-Team: Romanian - - {% else %} - {% if not form_visibility_input_title %} - {% trans "Form visibility" as form_visibility_input_title %} - {% endif %} - {% include "components/input/select.html" with input_title=form_visibility_input_title input_id="visibility" input_name="visibility" current_value=cause.visibility field=django_form.visibility options=visibility_choices is_required=True %} + {% if not form_visibility_input_title %} + {% trans "Form visibility" as form_visibility_input_title %} {% endif %} + {% blocktrans trimmed asvar visibility_helptext %} + Choose who can see and access your form. + Select "Public" to make it accessible to everyone, + "Unlisted" to not appear in search results but still accessible via a direct link, + or "Private" to restrict access only to you and your organization. + {% endblocktrans %} + {% include "components/input/select.html" with input_title=form_visibility_input_title help_text=visibility_helptext input_id="visibility" input_name="visibility" current_value=cause.visibility field=django_form.visibility options=visibility_choices is_required=True include_default_option=True %} From 27c0be7f40eb4013342683462792def177b2feb4 Mon Sep 17 00:00:00 2001 From: Tudor Amariei Date: Mon, 12 Jan 2026 14:33:52 +0200 Subject: [PATCH 2/2] modify translations --- backend/locale/en/LC_MESSAGES/django.po | 2 +- backend/locale/hy/LC_MESSAGES/django.po | 2 +- backend/locale/ro/LC_MESSAGES/django.po | 4 ++-- backend/templates/v2/ngo-account/cause/form.html | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/locale/en/LC_MESSAGES/django.po b/backend/locale/en/LC_MESSAGES/django.po index 3f03f5bb..9ad6e335 100644 --- a/backend/locale/en/LC_MESSAGES/django.po +++ b/backend/locale/en/LC_MESSAGES/django.po @@ -3408,7 +3408,7 @@ msgid "" "Choose who can see and access your form. Select \"Public\" to make it " "accessible to everyone, \"Unlisted\" to not appear in search results but " "still accessible via a direct link, or \"Private\" to restrict access only " -"to you and your organization." +"to you." msgstr "" #: templates/v2/ngo-account/cause/form.html:150 diff --git a/backend/locale/hy/LC_MESSAGES/django.po b/backend/locale/hy/LC_MESSAGES/django.po index 121a60bd..9276d872 100644 --- a/backend/locale/hy/LC_MESSAGES/django.po +++ b/backend/locale/hy/LC_MESSAGES/django.po @@ -3498,7 +3498,7 @@ msgid "" "Choose who can see and access your form. Select \"Public\" to make it " "accessible to everyone, \"Unlisted\" to not appear in search results but " "still accessible via a direct link, or \"Private\" to restrict access only " -"to you and your organization." +"to you." msgstr "" #: templates/v2/ngo-account/cause/form.html:150 diff --git a/backend/locale/ro/LC_MESSAGES/django.po b/backend/locale/ro/LC_MESSAGES/django.po index 2fc5d36f..6e9fed2a 100644 --- a/backend/locale/ro/LC_MESSAGES/django.po +++ b/backend/locale/ro/LC_MESSAGES/django.po @@ -3280,12 +3280,12 @@ msgid "" "Choose who can see and access your form. Select \"Public\" to make it " "accessible to everyone, \"Unlisted\" to not appear in search results but " "still accessible via a direct link, or \"Private\" to restrict access only " -"to you and your organization." +"to you." msgstr "" "Alege cine poate vedea și accesa formularul tău. Selectează „Public” pentru a " "îl face accesibil tuturor, „Nelistat” pentru a nu apărea în rezultatele de " "căutare, dar totuși accesibil printr-un link direct, sau „Privat” pentru a " -"restricționa accesul doar pentru tine și organizația ta." +"restricționa accesul doar pentru tine." #: templates/v2/ngo-account/cause/form.html:150 msgid "" diff --git a/backend/templates/v2/ngo-account/cause/form.html b/backend/templates/v2/ngo-account/cause/form.html index 4b51aecb..52135954 100644 --- a/backend/templates/v2/ngo-account/cause/form.html +++ b/backend/templates/v2/ngo-account/cause/form.html @@ -134,7 +134,7 @@ Choose who can see and access your form. Select "Public" to make it accessible to everyone, "Unlisted" to not appear in search results but still accessible via a direct link, - or "Private" to restrict access only to you and your organization. + or "Private" to restrict access only to you. {% endblocktrans %} {% include "components/input/select.html" with input_title=form_visibility_input_title help_text=visibility_helptext input_id="visibility" input_name="visibility" current_value=cause.visibility field=django_form.visibility options=visibility_choices is_required=True include_default_option=True %}