-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saisie des caractéristiques des haies #476
Changes from 17 commits
93019d5
0c8a602
4931752
3755614
8092260
bc63294
a418c71
acf85d1
577a5aa
730d114
bfc44ac
348de3a
6bbcb91
0c3d686
dcd5a43
03bcd66
04301b8
a0a37d4
6c2f9d8
40a0f5a
c038242
d9470f8
4d00fe9
9c3fb63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from django import forms | ||
from django.utils.safestring import mark_safe | ||
|
||
TYPES = ( | ||
("degradee", "Haie dégradée ou résiduelle basse"), | ||
("buissonnante", "Haie buissonnante basse"), | ||
("arbustive", "Haie arbustive basse"), | ||
("alignement", "Alignement d'arbres"), | ||
("mixte", "Mixte"), | ||
) | ||
|
||
|
||
class HedgeDataForm(forms.Form): | ||
hedge_type = forms.ChoiceField( | ||
choices=TYPES, | ||
label=mark_safe( | ||
""" | ||
<span>Type de haie</span> | ||
<a href="https://docs.google.com/document/d/1MAzLdH2ZsHHoHnK9ZgF47PrFT9SfnLnMA_IZwUI3sUc/edit?usp=sharing)" | ||
target="_blank" rel="noopener">Aide</a> | ||
""" | ||
), | ||
) | ||
sur_parcelle_pac = forms.BooleanField( | ||
label="Située sur parcelle PAC", required=False | ||
) | ||
proximite_mare = forms.BooleanField( | ||
label="Présence d'une mare à moins de 200 m", required=False | ||
) |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Je suis etonné que l'on doive ajouter cette icône, alors que ce comportement existe déjà pour les cartes d'aménagement. N'y a t-il pas une fonctionnalité par defaut de leaflet pour gerer la double vue sattelite/carte ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oui c'est le cas, c'est la demande de Camille. J'imagine que c'est pour plus de cohérence dans les icones ? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{% load utils %} | ||
|
||
<div id="form-group-{{ field.html_name }}" | ||
class="fr-select-group{% if field.field.required %} required{% endif %}{% if field.errors %} fr-select-group--error{% endif %}"> | ||
|
||
{% include '_label.html' %} | ||
|
||
{% if nest_field_class %}<div class="{{ nest_field_class }}">{% endif %} | ||
|
||
{% if field.errors %} | ||
{{ field|add_classes:'fr-select fr-input--error' }} | ||
{% else %} | ||
{{ field|add_classes:'fr-select' }} | ||
{% endif %} | ||
|
||
{% if nest_field_class %}</div>{% endif %} | ||
|
||
{% if field.help_text and bottom_help_text %}<span class="fr-hint-text">{{ field.help_text|safe }}</span>{% endif %} | ||
|
||
{% if field.errors %} | ||
<p class="fr-error-text"> | ||
↑ | ||
{{ field.errors.0 }} | ||
↑ | ||
</p> | ||
{% endif %} | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je sais que c'est dans le référentiel, mais en tant qu'utilisateur je trouverais ces trois premiers choix difficile à départager.
MaJ : je vois juste aprés qu'il y a une aide prévue. C'est mieux, mais ca reste irritant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est peut-être plus clair pour les agriculteurs ? Effectivement ça me semble assez obscur. Dans tous les cas, ça me semble moins un problème de code qu'une remarque à porter côté produit.