* adds EditEcoAccountForm
* adds placeholders for some form fields
* changes comment card in detail view into rlp-grayish
* adds eco account detail view comment box
* removes unnecessary loading of dal scripts in view.html
* refactors generated identifier for data objects (10 digits to 6 uppercase letter-digit combination)
* improves generate_random_string() method by adding more options for generation of strings
* adds/updates translations
This commit is contained in:
mipel
2021-10-06 13:10:10 +02:00
parent ac665c9268
commit 98f8a222dc
20 changed files with 305 additions and 166 deletions

View File

@@ -60,6 +60,7 @@ class NewInterventionForm(BaseForm):
widget=autocomplete.ModelSelect2(
url="codes-process-type-autocomplete",
attrs={
"data-placeholder": _("Click for selection"),
}
),
)
@@ -76,6 +77,7 @@ class NewInterventionForm(BaseForm):
widget=autocomplete.ModelSelect2Multiple(
url="codes-law-autocomplete",
attrs={
"data-placeholder": _("Click for selection"),
}
),
)
@@ -91,6 +93,7 @@ class NewInterventionForm(BaseForm):
widget=autocomplete.ModelSelect2(
url="codes-registration-office-autocomplete",
attrs={
"data-placeholder": _("Click for selection"),
}
),
)
@@ -106,6 +109,7 @@ class NewInterventionForm(BaseForm):
widget=autocomplete.ModelSelect2(
url="codes-conservation-office-autocomplete",
attrs={
"data-placeholder": _("Click for selection"),
}
),
)

View File

@@ -277,6 +277,7 @@ class NewDeductionModalForm(BaseModalForm):
widget=forms.NumberInput(
attrs={
"class": "form-control",
"placeholder": "0,00",
}
)
)
@@ -300,9 +301,6 @@ class NewDeductionModalForm(BaseModalForm):
self.form_caption = _("Enter the information for a new deduction from a chosen eco-account")
self.is_intervention_initially = False
# Add a placeholder for field 'surface' without having to define the whole widget above
self.add_placeholder_for_field("surface", "0,00")
# Check for Intervention or EcoAccount
if isinstance(self.instance, Intervention):
# Form has been called with a given intervention

View File

@@ -5,5 +5,5 @@ Contact: michel.peltriaux@sgdnord.rlp.de
Created on: 30.11.20
"""
INTERVENTION_IDENTIFIER_LENGTH = 10
INTERVENTION_IDENTIFIER_LENGTH = 6
INTERVENTION_IDENTIFIER_TEMPLATE = "EIV-{}"

View File

@@ -3,7 +3,7 @@
{% if intervention.comment %}
<div class="w-100">
<div class="card mt-3">
<div class="card-header rlp-r">
<div class="card-header rlp-gd">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<h5 class="card-title">

View File

@@ -1,16 +1,6 @@
{% extends 'base.html' %}
{% load i18n l10n %}
{% block head %}
{% comment %}
dal documentation (django-autocomplete-light) states using form.media for adding needed scripts.
This does not work properly with modal forms, as the scripts are not loaded properly inside the modal.
Therefore the script linkages from form.media have been extracted and put inside dal/scripts.html to ensure
these scripts are loaded when needed.
{% endcomment %}
{% include 'dal/scripts.html' %}
{% endblock %}
{% block body %}
{% include 'form/main_data_collapse_form.html' %}
{% endblock %}