diff --git a/geocity/admin_jazzmin_settings.py b/geocity/admin_jazzmin_settings.py index f54bc9bb6..2ef7a55b1 100644 --- a/geocity/admin_jazzmin_settings.py +++ b/geocity/admin_jazzmin_settings.py @@ -89,7 +89,8 @@ "constance.Config": "fas fa-cogs", "django_cron.CronJobLog": "fas fa-tasks", "forms.AdministrativeEntityForAdminSite": "fas fa-landmark", - "forms.ContactTypeForAdminSite": "fas fa-address-card", + "forms.ContactFormForAdminSite": "fas fa-address-card", + "forms.ContactTypeForAdminSite": "fas fa-hard-hat", "forms.PaymentSettings": "fas fa-shopping-cart", "forms.Price": "fas fa-coins", "forms.Field": "fas fa-list-ol", diff --git a/geocity/apps/accounts/admin.py b/geocity/apps/accounts/admin.py index 02ba9c403..f366d8388 100644 --- a/geocity/apps/accounts/admin.py +++ b/geocity/apps/accounts/admin.py @@ -317,6 +317,7 @@ class DepartmentAdminForm(forms.ModelForm): class Meta: model = models.PermitDepartment fields = [ + "shortname", "description", "administrative_entity", "is_validator", diff --git a/geocity/apps/accounts/migrations/0014_alter_administrativeentity_is_single_form_submissions_and_permitdepartment_shortname.py b/geocity/apps/accounts/migrations/0014_alter_administrativeentity_is_single_form_submissions_and_permitdepartment_shortname.py new file mode 100644 index 000000000..44952bf7f --- /dev/null +++ b/geocity/apps/accounts/migrations/0014_alter_administrativeentity_is_single_form_submissions_and_permitdepartment_shortname.py @@ -0,0 +1,32 @@ +# Generated by Django 4.2.4 on 2023-08-28 08:12 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("accounts", "0013_permitdepartment_generic_email_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="administrativeentity", + name="is_single_form_submissions", + field=models.BooleanField( + default=True, + help_text="Nécessaire pour l'utilisation du système de paiement en ligne", + verbose_name="Autoriser uniquement un objet par demande", + ), + ), + migrations.AlterField( + model_name="permitdepartment", + name="shortname", + field=models.CharField( + blank=True, + help_text="Nom affiché par défaut dans les différentes étapes du formulaire, ne s'affiche pas dans l'admin (max. 100 caractères)", + max_length=100, + verbose_name="nom court", + ), + ), + ] diff --git a/geocity/apps/accounts/models.py b/geocity/apps/accounts/models.py index 8d9221a1e..0ce0deac4 100644 --- a/geocity/apps/accounts/models.py +++ b/geocity/apps/accounts/models.py @@ -119,9 +119,9 @@ class PermitDepartment(models.Model): description = models.CharField(_("description"), max_length=100, default="Service") shortname = models.CharField( _("nom court"), - max_length=32, + max_length=100, help_text=_( - "Nom affiché par défaut dans les différentes étapes du formulaire, ne s'affiche pas dans l'admin (max. 32 caractères)" + "Nom affiché par défaut dans les différentes étapes du formulaire, ne s'affiche pas dans l'admin (max. 100 caractères)" ), blank=True, ) @@ -202,7 +202,7 @@ class Meta: ) def __str__(self): - return str(self.group) + return self.shortname if self.shortname else self.group.name class AdministrativeEntityQuerySet(models.QuerySet): @@ -295,7 +295,7 @@ class AdministrativeEntity(models.Model): ) is_single_form_submissions = models.BooleanField( _("Autoriser uniquement un objet par demande"), - default=False, + default=True, help_text=_("Nécessaire pour l'utilisation du système de paiement en ligne"), ) diff --git a/geocity/apps/accounts/permissions_groups.py b/geocity/apps/accounts/permissions_groups.py index f37247824..f62c1c4cf 100644 --- a/geocity/apps/accounts/permissions_groups.py +++ b/geocity/apps/accounts/permissions_groups.py @@ -11,7 +11,7 @@ "form", "field", "formfield", - "contacttypeforadminsite", + "contactformforadminsite", "paymentsettings", "price", "formprice", diff --git a/geocity/apps/accounts/templates/accounts/user_profile_edit.html b/geocity/apps/accounts/templates/accounts/user_profile_edit.html index 60ea359d9..4dc233b67 100644 --- a/geocity/apps/accounts/templates/accounts/user_profile_edit.html +++ b/geocity/apps/accounts/templates/accounts/user_profile_edit.html @@ -31,7 +31,7 @@
{% translate "Veuillez entrer votre jeton (code à usage unique, code SMS)" %}
+{% translate "Veuillez entrer votre jeton (code à usage unique), qui se trouve dans votre application d'authentification (Authenticator, Duo, LastPass, etc.) ou transmis par SMS." %}