Skip to content

Commit

Permalink
feat: rename data authorization
Browse files Browse the repository at this point in the history
Rename the data_authorization field of NauUserExtendedModel.
The motivation is that we need to add multiple authorization
checkboxes to the register page, requested by the DPO.

fccn/nau-technical#83
  • Loading branch information
igobranco committed Apr 12, 2024
1 parent 83c62e5 commit 830ace3
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 36 deletions.
7 changes: 5 additions & 2 deletions nau_openedx_extensions/custom_registration_form/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class NauUserExtendedModel(models.Model):
"""
Holds data autorization field
Holds data authorization field
Used during user registration as a form extension.
"""

Expand All @@ -37,7 +37,10 @@ class NauUserExtendedModel(models.Model):

user = models.OneToOneField(USER_MODEL, on_delete=models.CASCADE, null=True)
data_authorization = models.BooleanField(
verbose_name=_("I authorize data processing for this site "), default=False
verbose_name=_(
"I have read and understood the <a href='https://www.nau.edu.pt/legal/politica-de-privacidade/' "
"rel='noopener' target='_blank'>Privacy Policy</a>"
), default=False
)
nif = models.CharField(
verbose_name=_("NIF"), max_length=9, blank=True, null=True
Expand Down
Binary file modified nau_openedx_extensions/locale/en/LC_MESSAGES/django.mo
Binary file not shown.
41 changes: 24 additions & 17 deletions nau_openedx_extensions/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2023-07-03 17:12+0100\n"
"POT-Creation-Date: 2024-04-12 17:27+0100\n"
"PO-Revision-Date: 2021-02-15 15:56+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n"
Expand Down Expand Up @@ -47,60 +47,61 @@ msgid "Other"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:40
msgid "I authorize data processing for this site "
msgid ""
"I have read and understood the <a href='https://www.nau.edu.pt/legal"
"/politica-de-privacidade/' rel='noopener' target='_blank'>Privacy "
"Policy</a>"
msgstr ""
"I authorize data to be processed according to terms of service and "
"privacy policy"

#: nau_openedx_extensions/custom_registration_form/models.py:43
#: nau_openedx_extensions/custom_registration_form/models.py:46
msgid "NIF"
msgstr "NIF - Portuguese VAT identification number"

#: nau_openedx_extensions/custom_registration_form/models.py:46
#: nau_openedx_extensions/custom_registration_form/models.py:49
msgid "CC NIF"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:49
#: nau_openedx_extensions/custom_registration_form/models.py:52
msgid "CC NIC"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:52
#: nau_openedx_extensions/custom_registration_form/models.py:55
msgid "CC NIC Check Digit"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:55
#: nau_openedx_extensions/custom_registration_form/models.py:58
msgid "CC First name"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:57
#: nau_openedx_extensions/custom_registration_form/models.py:60
msgid "CC Last name"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:59
#: nau_openedx_extensions/custom_registration_form/models.py:62
msgid "CC Nacionality"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:62
#: nau_openedx_extensions/custom_registration_form/models.py:65
msgid "CC Zip code 3 digits"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:65
#: nau_openedx_extensions/custom_registration_form/models.py:68
msgid "CC Zip code 4 digits"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:68
#: nau_openedx_extensions/custom_registration_form/models.py:71
msgid "CC Document number"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:71
#: nau_openedx_extensions/custom_registration_form/models.py:74
msgid "CC Birth date"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:74
#: nau_openedx_extensions/custom_registration_form/models.py:77
msgid "Employment situation"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:77
#: nau_openedx_extensions/custom_registration_form/models.py:80
msgid "Allow newsletter"
msgstr ""
"I agree to receive information regarding the courses offered by NAU, as "
Expand Down Expand Up @@ -163,3 +164,9 @@ msgstr ""
msgid "Send Message"
msgstr ""

#~ msgid "I have read and understood the Privacy Policy"
#~ msgstr ""
#~ "I authorize data to be processed "
#~ "according to terms of service and "
#~ "privacy policy"

Binary file modified nau_openedx_extensions/locale/pt_PT/LC_MESSAGES/django.mo
Binary file not shown.
37 changes: 20 additions & 17 deletions nau_openedx_extensions/locale/pt_PT/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2023-07-03 17:12+0100\n"
"POT-Creation-Date: 2024-04-12 17:27+0100\n"
"PO-Revision-Date: 2021-02-15 15:56+0000\n"
"Last-Translator: Ivo Branco <[email protected]>\n"
"Language: pt_PT\n"
Expand Down Expand Up @@ -47,60 +47,63 @@ msgid "Other"
msgstr "Outro"

#: nau_openedx_extensions/custom_registration_form/models.py:40
msgid "I authorize data processing for this site "
msgid ""
"I have read and understood the <a href='https://www.nau.edu.pt/legal"
"/politica-de-privacidade/' rel='noopener' target='_blank'>Privacy "
"Policy</a>"
msgstr ""
"Autorizo que os dados sejam processados segundo os termos de serviço e "
"política de privacidade"
"Li e compreendi a <a href='https://www.nau.edu.pt/legal/politica-de-"
"privacidade/' rel='noopener' target='_blank'>Política de Privacidade</a>"

#: nau_openedx_extensions/custom_registration_form/models.py:43
#: nau_openedx_extensions/custom_registration_form/models.py:46
msgid "NIF"
msgstr "NIF - Nº de Identificação Fiscal"

#: nau_openedx_extensions/custom_registration_form/models.py:46
#: nau_openedx_extensions/custom_registration_form/models.py:49
msgid "CC NIF"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:49
#: nau_openedx_extensions/custom_registration_form/models.py:52
msgid "CC NIC"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:52
#: nau_openedx_extensions/custom_registration_form/models.py:55
msgid "CC NIC Check Digit"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:55
#: nau_openedx_extensions/custom_registration_form/models.py:58
msgid "CC First name"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:57
#: nau_openedx_extensions/custom_registration_form/models.py:60
msgid "CC Last name"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:59
#: nau_openedx_extensions/custom_registration_form/models.py:62
msgid "CC Nacionality"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:62
#: nau_openedx_extensions/custom_registration_form/models.py:65
msgid "CC Zip code 3 digits"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:65
#: nau_openedx_extensions/custom_registration_form/models.py:68
msgid "CC Zip code 4 digits"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:68
#: nau_openedx_extensions/custom_registration_form/models.py:71
msgid "CC Document number"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:71
#: nau_openedx_extensions/custom_registration_form/models.py:74
msgid "CC Birth date"
msgstr ""

#: nau_openedx_extensions/custom_registration_form/models.py:74
#: nau_openedx_extensions/custom_registration_form/models.py:77
msgid "Employment situation"
msgstr "Situação profissional"

#: nau_openedx_extensions/custom_registration_form/models.py:77
#: nau_openedx_extensions/custom_registration_form/models.py:80
msgid "Allow newsletter"
msgstr ""
"Aceito receber informações no âmbito dos cursos disponibilizados pela "
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 3.2.16 on 2024-04-12 15:20

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('nau_openedx_extensions', '0007_auto_20220223_1158'),
]

operations = [
migrations.DeleteModel(
name='CourseAccessRoleProxy',
),
migrations.AlterField(
model_name='nauuserextendedmodel',
name='data_authorization',
field=models.BooleanField(default=False, verbose_name="I have read and understood the <a href='https://www.nau.edu.pt/legal/politica-de-privacidade/' rel='noopener' target='_blank'>Privacy Policy</a>"),
),
]

0 comments on commit 830ace3

Please sign in to comment.