summaryrefslogtreecommitdiff
path: root/archaeological_files/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2013-12-14 23:52:13 +0100
committerÉtienne Loks <etienne.loks@peacefrogs.net>2013-12-14 23:52:13 +0100
commitccb709bfa5d06737e70c171202ba85aa5410194c (patch)
treee702a5e335c4366a1e27499a4db51e31b7f5c7b7 /archaeological_files/forms.py
parent9b3ede3e6d5d2b076975c188454a39c2b45d155d (diff)
parent1a1040243a10366b01b9bc2c4d3140f2fbd321e4 (diff)
downloadIshtar-ccb709bfa5d06737e70c171202ba85aa5410194c.tar.bz2
Ishtar-ccb709bfa5d06737e70c171202ba85aa5410194c.zip
Merge branch 'master' of lysithea.proxience.net:/home/proxience/git/ishtar
Diffstat (limited to 'archaeological_files/forms.py')
-rw-r--r--archaeological_files/forms.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/archaeological_files/forms.py b/archaeological_files/forms.py
index ec9409ef6..a4a20938b 100644
--- a/archaeological_files/forms.py
+++ b/archaeological_files/forms.py
@@ -194,28 +194,6 @@ class FinalFileDeleteForm(FinalForm):
confirm_msg = " "
confirm_end_msg = _(u"Would you like to delete this archaelogical file ?")
-class DocumentGenerationAdminActForm(forms.Form):
- _associated_model = AdministrativeAct
- document_template = forms.ChoiceField(label=_("Template"), choices=[])
-
- def __init__(self, *args, **kwargs):
- super(DocumentGenerationAdminActForm, self).__init__(*args, **kwargs)
- self.fields['document_template'].choices = DocumentTemplate.get_tuples(
- dct={'associated_object_name':
- 'archaeological_operations.models.AdministrativeAct'})
-
- def save(self, object_pk):
- try:
- c_object = self._associated_model.objects.get(pk=object_pk)
- except self._associated_model.DoesNotExist:
- return
- try:
- template = DocumentTemplate.objects.get(
- pk=self.cleaned_data.get('document_template'))
- except DocumentTemplate.DoesNotExist:
- return
- return template.publish(c_object)
-
class AdministrativeActFileSelect(TableSelect):
associated_file__towns = get_town_field()
act_type = forms.ChoiceField(label=_("Act type"), choices=[])