Skip to content

Commit

Permalink
Allow for a second id photo
Browse files Browse the repository at this point in the history
  • Loading branch information
txels committed Apr 9, 2024
1 parent d1b2c04 commit f6683a4
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 13 deletions.
34 changes: 22 additions & 12 deletions locale/ca/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-04-09 11:57+0000\n"
"POT-Creation-Date: 2024-04-09 18:10+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -97,15 +97,15 @@ msgstr "Envia correu per reiniciar contrasenya"
msgid "Contact"
msgstr "Contacte"

#: shipanaro/admin.py:138 shipanaro/models.py:84
#: shipanaro/admin.py:138 shipanaro/models.py:92
msgid "Address"
msgstr "Adreça"

#: shipanaro/admin.py:151
msgid "Status"
msgstr "Estat"

#: shipanaro/admin.py:160 shipanaro/models.py:109
#: shipanaro/admin.py:160 shipanaro/models.py:117
msgid "Notes"
msgstr "Notes"

Expand Down Expand Up @@ -247,35 +247,45 @@ msgstr "Número d'identificació"
msgid "ID Type"
msgstr "Tipus d'identificació"

#: shipanaro/models.py:79
msgid "Use a picture that includes both sides of an ID card"
msgstr "Utilitza una foto on es vegin les dues cares del document (max 10Mb)"

#: shipanaro/models.py:80
msgid ""
"Use a picture that includes both sides of an ID card, or add a second photo "
"below"
msgstr "Utilitza una foto on es vegin les dues cares del document (max 10Mb), o afegeix una segona foto més avall"

#: shipanaro/models.py:82
msgid "ID Photo"
msgstr "Fotografia del document d'identificació"

#: shipanaro/models.py:87
msgid "Additional picture for id side 2"
msgstr "Foto addicional per l'altra banda del document"

#: shipanaro/models.py:88
msgid "ID Photo 2"
msgstr "Fotografia addicional del document d'identificació"

#: shipanaro/models.py:96
msgid "City"
msgstr "Municipi"

#: shipanaro/models.py:92
#: shipanaro/models.py:100
msgid "Postcode"
msgstr "Codi Postal"

#: shipanaro/models.py:96
#: shipanaro/models.py:104
msgid "Province"
msgstr "Província"

#: shipanaro/models.py:100
#: shipanaro/models.py:108
msgid "Phone"
msgstr "Telèfon"

#: shipanaro/models.py:104
#: shipanaro/models.py:112
msgid "Phone 2"
msgstr "Telèfon 2"

#: shipanaro/models.py:137
#: shipanaro/models.py:145
msgid "Newsletter"
msgstr "Butlletí"

Expand Down
2 changes: 2 additions & 0 deletions shipanaro/auth/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class Meta:
"nid_type",
"nid",
"id_photo",
"id_photo2",
"address",
"city",
"postal_code",
Expand Down Expand Up @@ -130,6 +131,7 @@ def __init__(self, *args, **kwargs):
css_class="form-row",
),
"id_photo",
"id_photo2",
HTML("<h4>Domicili</h4>"),
"address",
Row(
Expand Down
23 changes: 23 additions & 0 deletions shipanaro/migrations/0017_auto_20240409_1814.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.25 on 2024-04-09 18:14

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('shipanaro', '0016_auto_20240227_1726'),
]

operations = [
migrations.AddField(
model_name='membership',
name='id_photo2',
field=models.ImageField(blank=True, help_text="Foto addicional per l'altra banda del document", null=True, upload_to='id_photos', verbose_name="Fotografia addicional del document d'identificació"),
),
migrations.AlterField(
model_name='membership',
name='id_photo',
field=models.ImageField(help_text='Utilitza una foto on es vegin les dues cares del document (max 10Mb), o afegeix una segona foto més avall', null=True, upload_to='id_photos', verbose_name="Fotografia del document d'identificació"),
),
]
11 changes: 10 additions & 1 deletion shipanaro/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,19 @@ class Membership(models.Model):
)
id_photo = models.ImageField(
upload_to="id_photos",
help_text=_("Use a picture that includes both sides of an ID card"),
help_text=_(
"Use a picture that includes both sides of an ID card, or add a second photo below"
),
verbose_name=_("ID Photo"),
null=True,
)
id_photo2 = models.ImageField(
upload_to="id_photos",
help_text=_("Additional picture for id side 2"),
verbose_name=_("ID Photo 2"),
blank=True,
null=True,
)
address = models.CharField(
verbose_name=_("Address"),
max_length=140,
Expand Down

0 comments on commit f6683a4

Please sign in to comment.