summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-04-11 18:56:05 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-04-11 18:56:05 +0200
commitdfd6fd2551a9cc54e6b69d4f5d4d4aa328b9cc7a (patch)
tree916cf36d9cd6d58e0c10e8711ee0c3f96c7bb221 /archaeological_finds
parent987f84ca3aec153a6a9179e2b51083d7afaa9337 (diff)
parente3bdd4b6d2a32c010138e8f4581234d18cf51519 (diff)
downloadIshtar-dfd6fd2551a9cc54e6b69d4f5d4d4aa328b9cc7a.tar.bz2
Ishtar-dfd6fd2551a9cc54e6b69d4f5d4d4aa328b9cc7a.zip
Merge branch 'master' into v0.9
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/fixtures/initial_data-fr.json65
-rw-r--r--archaeological_finds/forms.py20
-rw-r--r--archaeological_finds/models_treatments.py6
3 files changed, 78 insertions, 13 deletions
diff --git a/archaeological_finds/fixtures/initial_data-fr.json b/archaeological_finds/fixtures/initial_data-fr.json
index 341b351f8..b8f233f88 100644
--- a/archaeological_finds/fixtures/initial_data-fr.json
+++ b/archaeological_finds/fixtures/initial_data-fr.json
@@ -892,7 +892,7 @@
"fields": {
"comment": "",
"available": true,
- "txt_idx": "In_progress",
+ "txt_idx": "in_progress",
"label": "En cours"
}
},
@@ -7570,5 +7570,68 @@
"txt_idx": "integrity_lost",
"label": "Perte d'int\u00e9grit\u00e9 totale"
}
+ },
+ {
+ "pk": 1,
+ "model": "archaeological_finds.batchtype",
+ "fields": {
+ "comment": null,
+ "available": true,
+ "txt_idx": "inconnu",
+ "order": 0,
+ "label": "Inconnu"
+ }
+ },
+ {
+ "pk": 2,
+ "model": "archaeological_finds.batchtype",
+ "fields": {
+ "comment": null,
+ "available": true,
+ "txt_idx": "objet",
+ "order": 1,
+ "label": "Objet"
+ }
+ },
+ {
+ "pk": 3,
+ "model": "archaeological_finds.batchtype",
+ "fields": {
+ "comment": null,
+ "available": true,
+ "txt_idx": "lot",
+ "order": 2,
+ "label": "Lot"
+ }
+ },
+ {
+ "pk": 1,
+ "model": "archaeological_finds.treatmentfiletype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "txt_idx": "loan_demand_study",
+ "label": "Demande de pr\u00eat pour \u00e9tude"
+ }
+ },
+ {
+ "pk": 2,
+ "model": "archaeological_finds.treatmentfiletype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "txt_idx": "loan_demand_exposure",
+ "label": "Demande de pr\u00eat pour exposition"
+ }
+ },
+ {
+ "pk": 3,
+ "model": "archaeological_finds.treatmentfiletype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "txt_idx": "gift_wish",
+ "label": "Intention de donation"
+ }
}
] \ No newline at end of file
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py
index 8fe945e88..bdb602606 100644
--- a/archaeological_finds/forms.py
+++ b/archaeological_finds/forms.py
@@ -148,8 +148,7 @@ class FindForm(ManageOldType, forms.Form):
is_complete = forms.NullBooleanField(label=_(u"Is complete?"),
required=False)
material_type = widgets.Select2MultipleField(
- model=models.MaterialType, label=_(u"Material type"), required=False,
- available=True
+ label=_(u"Material type"), required=False
)
conservatory_state = forms.ChoiceField(label=_(u"Conservatory state"),
choices=[], required=False)
@@ -157,18 +156,17 @@ class FindForm(ManageOldType, forms.Form):
label=_(u"Conservatory comment"), required=False,
widget=forms.Textarea)
object_type = widgets.Select2MultipleField(
- model=models.ObjectType, label=_(u"Object types"), required=False,
- available=True
+ label=_(u"Object types"), required=False,
)
preservation_to_consider = forms.MultipleChoiceField(
label=_(u"Preservation type"), choices=[],
widget=widgets.Select2Multiple, required=False)
integritie = forms.MultipleChoiceField(
label=_(u"Integrity / interest"), choices=[],
- widget=widgets.CheckboxSelectMultiple, required=False)
+ widget=widgets.Select2Multiple, required=False)
remarkabilitie = forms.MultipleChoiceField(
label=_(u"Remarkability"), choices=[],
- widget=widgets.CheckboxSelectMultiple, required=False)
+ widget=widgets.Select2Multiple, required=False)
get_first_base_find__topographic_localisation = forms.CharField(
label=_(u"Point of topographic reference"),
required=False, max_length=120
@@ -232,8 +230,18 @@ class FindForm(ManageOldType, forms.Form):
self.fields[srs].help_text = \
SpatialReferenceSystem.get_help()
self.fields['checked'].choices = models.CHECK_CHOICES
+ self.fields['material_type'].choices = models.MaterialType.get_types(
+ initial=self.init_data.get('material_type'),
+ empty_first=False
+ )
self.fields['material_type'].help_text = models.MaterialType.get_help()
+ self.fields['object_type'].choices = models.ObjectType.get_types(
+ initial=self.init_data.get('object_type'),
+ empty_first=False
+ )
+ self.fields['object_type'].help_text = models.ObjectType.get_help()
+
self.fields['get_first_base_find__batch'].choices = \
models.BatchType.get_types(
initial=self.init_data.get('get_first_base_find__batch'))
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py
index d3e18122c..47f60bb44 100644
--- a/archaeological_finds/models_treatments.py
+++ b/archaeological_finds/models_treatments.py
@@ -629,12 +629,6 @@ class TreatmentFileSource(Source):
permissions = (
("view_filetreatmentsource",
ugettext(u"Can view Treatment request source")),
- ("add_filetreatmentsource",
- ugettext(u"Can add Treatment request source")),
- ("change_filetreatmentsource",
- ugettext(u"Can change Treatment request source")),
- ("delete_filetreatmentsource",
- ugettext(u"Can delete Treatment request source")),
("view_own_filetreatmentsource",
ugettext(u"Can view own Treatment request source")),
("add_own_filetreatmentsource",