summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-11-03 14:26:51 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:20:59 +0100
commit9bc1bc57fab26fd6d159341ddb74299ad8b2980e (patch)
tree40c1b117ef43357a6a25e2681ff49c0e86f6a6a1
parentdb6f3f2152bfb480915a63ae04e88f2979d23341 (diff)
downloadIshtar-9bc1bc57fab26fd6d159341ddb74299ad8b2980e.tar.bz2
Ishtar-9bc1bc57fab26fd6d159341ddb74299ad8b2980e.zip
Increase phone number length (refs #5204)
-rw-r--r--ishtar_common/forms_common.py12
-rw-r--r--ishtar_common/migrations/0217_auto_20211103_1422.py (renamed from ishtar_common/migrations/0217_auto_20211019_2242.py)89
-rw-r--r--ishtar_common/models_common.py8
3 files changed, 97 insertions, 12 deletions
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py
index 6f0d01427..70727b243 100644
--- a/ishtar_common/forms_common.py
+++ b/ishtar_common/forms_common.py
@@ -426,9 +426,9 @@ class OrganizationForm(ManageOldType, NewItemForm):
precise_town = get_town_field(required=False)
country = forms.CharField(label=_("Country"), max_length=30, required=False)
email = forms.EmailField(label=_("Email"), required=False)
- phone = forms.CharField(label=_("Phone"), max_length=18, required=False)
+ phone = forms.CharField(label=_("Phone"), max_length=32, required=False)
mobile_phone = forms.CharField(
- label=_("Mobile phone"), max_length=18, required=False
+ label=_("Mobile phone"), max_length=32, required=False
)
def __init__(self, *args, **kwargs):
@@ -778,17 +778,17 @@ class SimplePersonForm(ManageOldType, NewItemForm):
phone_desc = forms.CharField(
label=_("Phone description"), max_length=300, required=False
)
- phone = forms.CharField(label=_("Phone"), max_length=18, required=False)
+ phone = forms.CharField(label=_("Phone"), max_length=32, required=False)
phone_desc2 = forms.CharField(
label=_("Phone description 2"), max_length=300, required=False
)
- phone2 = forms.CharField(label=_("Phone 2"), max_length=18, required=False)
+ phone2 = forms.CharField(label=_("Phone 2"), max_length=32, required=False)
phone_desc3 = forms.CharField(
label=_("Phone description 3"), max_length=300, required=False
)
- phone3 = forms.CharField(label=_("Phone 3"), max_length=18, required=False)
+ phone3 = forms.CharField(label=_("Phone 3"), max_length=32, required=False)
mobile_phone = forms.CharField(
- label=_("Mobile phone"), max_length=18, required=False
+ label=_("Mobile phone"), max_length=32, required=False
)
attached_to = forms.IntegerField(
label=_("Current organization"),
diff --git a/ishtar_common/migrations/0217_auto_20211019_2242.py b/ishtar_common/migrations/0217_auto_20211103_1422.py
index 4a0851691..103c01840 100644
--- a/ishtar_common/migrations/0217_auto_20211019_2242.py
+++ b/ishtar_common/migrations/0217_auto_20211103_1422.py
@@ -1,4 +1,4 @@
-# Generated by Django 2.2.24 on 2021-10-19 22:42
+# Generated by Django 2.2.24 on 2021-11-03 14:22
from django.conf import settings
import django.contrib.postgres.fields
@@ -23,7 +23,7 @@ class Migration(migrations.Migration):
('url', models.URLField(verbose_name='URL')),
('name', models.CharField(max_length=200, verbose_name='Name')),
('key', models.CharField(max_length=40, verbose_name='Key')),
- ('match_document', models.FileField(blank=True, help_text='First use the "Update types from source" action. Then use the action "Generate match document" action to create a default match document. Complete it and attach it back to the source to finally use the action "Modify association from match document".', null=True, upload_to='', verbose_name='Match document')),
+ ('match_document', models.FileField(blank=True, help_text='First use the "Update types from source" action. Then use the action "Generate match document" action to create a default match document. Complete it and attach it back to the source to finally use the action "Update association from match document".', null=True, upload_to='', verbose_name='Match document')),
],
options={
'verbose_name': 'API - Search - External source',
@@ -82,6 +82,26 @@ class Migration(migrations.Migration):
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict),
),
migrations.AlterField(
+ model_name='historicalorganization',
+ name='mobile_phone',
+ field=models.CharField(blank=True, max_length=32, null=True, verbose_name='Mobile phone'),
+ ),
+ migrations.AlterField(
+ model_name='historicalorganization',
+ name='phone',
+ field=models.CharField(blank=True, max_length=32, null=True, verbose_name='Phone'),
+ ),
+ migrations.AlterField(
+ model_name='historicalorganization',
+ name='phone2',
+ field=models.CharField(blank=True, max_length=32, null=True, verbose_name='Phone description 2'),
+ ),
+ migrations.AlterField(
+ model_name='historicalorganization',
+ name='phone3',
+ field=models.CharField(blank=True, max_length=32, null=True, verbose_name='Phone 3'),
+ ),
+ migrations.AlterField(
model_name='historicalperson',
name='data',
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict),
@@ -92,6 +112,26 @@ class Migration(migrations.Migration):
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict),
),
migrations.AlterField(
+ model_name='historicalperson',
+ name='mobile_phone',
+ field=models.CharField(blank=True, max_length=32, null=True, verbose_name='Mobile phone'),
+ ),
+ migrations.AlterField(
+ model_name='historicalperson',
+ name='phone',
+ field=models.CharField(blank=True, max_length=32, null=True, verbose_name='Phone'),
+ ),
+ migrations.AlterField(
+ model_name='historicalperson',
+ name='phone2',
+ field=models.CharField(blank=True, max_length=32, null=True, verbose_name='Phone description 2'),
+ ),
+ migrations.AlterField(
+ model_name='historicalperson',
+ name='phone3',
+ field=models.CharField(blank=True, max_length=32, null=True, verbose_name='Phone 3'),
+ ),
+ migrations.AlterField(
model_name='ishtarsiteprofile',
name='default_language',
field=models.ForeignKey(blank=True, help_text='If set, by default the selected language will be set for localized documents.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='ishtar_common.Language', verbose_name='Default language for documentation'),
@@ -117,6 +157,11 @@ class Migration(migrations.Migration):
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='ishtar_common.IshtarUser'),
),
migrations.AlterField(
+ model_name='jsondatafield',
+ name='value_type',
+ field=models.CharField(choices=[('T', 'Text'), ('LT', 'Long text'), ('I', 'Integer'), ('B', 'Boolean'), ('F', 'Float'), ('D', 'Date'), ('C', 'Choices'), ('MC', 'Multi-choices')], default='T', max_length=10, verbose_name='Type'),
+ ),
+ migrations.AlterField(
model_name='organization',
name='data',
field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict),
@@ -128,11 +173,31 @@ class Migration(migrations.Migration):
),
migrations.AlterField(
model_name='organization',
+ name='mobile_phone',
+ field=models.CharField(blank=True, max_length=32, null=True, verbose_name='Mobile phone'),
+ ),
+ migrations.AlterField(
+ model_name='organization',
name='organization_type',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='ishtar_common.OrganizationType', verbose_name='Type'),
),
migrations.AlterField(
model_name='organization',
+ name='phone',
+ field=models.CharField(blank=True, max_length=32, null=True, verbose_name='Phone'),
+ ),
+ migrations.AlterField(
+ model_name='organization',
+ name='phone2',
+ field=models.CharField(blank=True, max_length=32, null=True, verbose_name='Phone description 2'),
+ ),
+ migrations.AlterField(
+ model_name='organization',
+ name='phone3',
+ field=models.CharField(blank=True, max_length=32, null=True, verbose_name='Phone 3'),
+ ),
+ migrations.AlterField(
+ model_name='organization',
name='precise_town',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='ishtar_common.Town', verbose_name='Town (precise)'),
),
@@ -148,6 +213,26 @@ class Migration(migrations.Migration):
),
migrations.AlterField(
model_name='person',
+ name='mobile_phone',
+ field=models.CharField(blank=True, max_length=32, null=True, verbose_name='Mobile phone'),
+ ),
+ migrations.AlterField(
+ model_name='person',
+ name='phone',
+ field=models.CharField(blank=True, max_length=32, null=True, verbose_name='Phone'),
+ ),
+ migrations.AlterField(
+ model_name='person',
+ name='phone2',
+ field=models.CharField(blank=True, max_length=32, null=True, verbose_name='Phone description 2'),
+ ),
+ migrations.AlterField(
+ model_name='person',
+ name='phone3',
+ field=models.CharField(blank=True, max_length=32, null=True, verbose_name='Phone 3'),
+ ),
+ migrations.AlterField(
+ model_name='person',
name='precise_town',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='ishtar_common.Town', verbose_name='Town (precise)'),
),
diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py
index 4f3f54bea..79022acc6 100644
--- a/ishtar_common/models_common.py
+++ b/ishtar_common/models_common.py
@@ -2150,23 +2150,23 @@ class Address(BaseHistorizedItem):
alt_country = models.CharField(
_("Other address: country"), max_length=30, null=True, blank=True
)
- phone = models.CharField(_("Phone"), max_length=18, null=True, blank=True)
+ phone = models.CharField(_("Phone"), max_length=32, null=True, blank=True)
phone_desc = models.CharField(
_("Phone description"), max_length=300, null=True, blank=True
)
phone2 = models.CharField(
- _("Phone description 2"), max_length=18, null=True, blank=True
+ _("Phone description 2"), max_length=32, null=True, blank=True
)
phone_desc2 = models.CharField(
_("Phone description 2"), max_length=300, null=True, blank=True
)
- phone3 = models.CharField(_("Phone 3"), max_length=18, null=True, blank=True)
+ phone3 = models.CharField(_("Phone 3"), max_length=32, null=True, blank=True)
phone_desc3 = models.CharField(
_("Phone description 3"), max_length=300, null=True, blank=True
)
raw_phone = models.TextField(_("Raw phone"), blank=True, default="")
mobile_phone = models.CharField(
- _("Mobile phone"), max_length=18, null=True, blank=True
+ _("Mobile phone"), max_length=32, null=True, blank=True
)
email = models.EmailField(_("Email"), max_length=300, blank=True, null=True)
alt_address_is_prefered = models.BooleanField(