diff --git a/backend/donations/views/my_account.py b/backend/donations/views/my_account.py index 5c0b943b..c148b742 100644 --- a/backend/donations/views/my_account.py +++ b/backend/donations/views/my_account.py @@ -187,10 +187,13 @@ def get(self, request, *args, **kwargs): if not user.is_authenticated or not user.ngo: return redirect(reverse("contul-meu")) + is_ngohub_ngo = user.ngo.ngohub_org_id is not None + context = { "title": "Date organizație", "user": user, "ngo": user.ngo if user.ngo else None, + "has_ngohub": is_ngohub_ngo, "counties": settings.FORM_COUNTIES_NATIONAL, } diff --git a/backend/templates/v1/components/county.html b/backend/templates/v1/components/county.html index 31675706..39ad5328 100644 --- a/backend/templates/v1/components/county.html +++ b/backend/templates/v1/components/county.html @@ -1,11 +1,19 @@ - + + + {% for number in range(1, 7) %} + {% endfor %} + + {% for county_name in counties %} + + {% endfor %} diff --git a/backend/templates/v1/components/ngo-details-form.html b/backend/templates/v1/components/ngo-details-form.html index a81c4fb0..b3482672 100644 --- a/backend/templates/v1/components/ngo-details-form.html +++ b/backend/templates/v1/components/ngo-details-form.html @@ -1,175 +1,232 @@ -
- {{ csrf_input }} -
- Datele organizației: -
-
- -
-
-
-
- {% if ngo.registration_number %} - - - {% endif %} -
-
- -
-
-
-
- -
-
- -
-
- -
-
-
-
- -
-
- {% with identifier="ong-judet" %} - {% with county=ngo.county if ngo %} - {% include "components/county.html" %} - {% endwith %} - {% endwith %} -
-
-
-
- - {% with identifier="ong-activitate" %} - {% with county=ngo.active_region if ngo %} - {% include "components/county.html" %} - {% endwith %} - {% endwith %} -
-
-
-
-
Poți alege un url personalizat pentru organizația ta:
-
- - -
-
+ + {{ csrf_input }} + +
+
+ +

Datele organizației

+ +
+ +

+ Aici poți introduce datele organizației tale. Acestea vor fi folosite pentru a completa formularul de donații. +

+ + {% if has_ngohub %} +

+ + Ai cont pe NGO Hub, deci unele date nu sunt pot fi editate aici. + +

+ {% endif %} + +
+ +
+ +
+

Date de contact

+ +
+ +
+
+
+ +
+ {% if ngo.registration_number %} + + + {% endif %} +
+ +
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ {% with identifier="ong-judet" %} + {% with county=ngo.county if ngo %} + {% with is_disabled=has_ngohub %} + {% include "components/county.html" %} + {% endwith %} + {% endwith %} + {% endwith %} +
+
+
+
+ + {% with identifier="ong-activitate" %} + {% with county=ngo.active_region if ngo %} + {% with is_disabled=has_ngohub %} + {% include "components/county.html" %} + {% endwith %} + {% endwith %} + {% endwith %} +
+
+
+
+
Poți alege un url personalizat pentru organizația ta:
+
+ +
-
+
+ +
+
+

Date financiare

+

Aceste date sunt necesare pentru formular:

+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+ {% if is_admin %}
- Date financiare -

Aceste date sunt necesare pentru formular:

-
- -
- -
+ Admin + +
+
+ +
-
- -
- -
+
+ +
-
-
- +
+ + {% if owner %} +
+
+
+
+

Cont asociat:

+
+
+

Nume: {{ "{0} {1}".format(owner.first_name, owner.last_name) }}

+

Email: {{ owner.email }}

+

Verificat: {{ owner.is_verified }}

+

Creat la: {{ owner.date_joined.strftime("%d/%m/%Y") }}

+
- -
-
-
- +
+
+
+
+

Schimbare posesor:

+
+
+

+ Dacă vrei sa schimbi cine deține acest ONG, adaugă mai jos adresa de email a noului cont: +

+ +
- +
- + {% endif %}
- {% if is_admin %} -
- Admin - -
-
- - -
-
- - -
-
+ {% endif %} - {% if owner %} -
-
-
-
-

Cont asociat:

-
-
-

Nume: {{ "{0} {1}".format(owner.first_name, owner.last_name) }}

-

Email: {{ owner.email }}

-

Verificat: {{ owner.is_verified }}

-

Creat la: {{ owner.date_joined.strftime("%d/%m/%Y") }}

-
-
-
-
-
-
-

Schimbare posesor:

-
-
-

- Dacă vrei sa schimbi cine deține acest ONG, adaugă mai jos adresa de email a noului cont: -

- -
-
-
-
- {% endif %} -
- {% endif %} - -
-
- -
+
+
+
+
{# this script is only for setting up the ngo #} {# if it's a new ngo #} {% if not ngo.key %} - + {% endif %}