summaryrefslogtreecommitdiff
path: root/archaeological_operations/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-01-10 00:26:07 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-01-10 00:26:07 +0100
commitc0f14049777002bf0849f04dabc99a6bc66de295 (patch)
tree777c2f1bcfc1cde0056a64b04d0ee322948ade56 /archaeological_operations/forms.py
parent229a5559e9933ea76020963ca3778906d39279d4 (diff)
parent1191cb323ca087ea05d5f58acb555b8e2d266801 (diff)
downloadIshtar-c0f14049777002bf0849f04dabc99a6bc66de295.tar.bz2
Ishtar-c0f14049777002bf0849f04dabc99a6bc66de295.zip
Merge branch 'master' into v0.9
Conflicts: archaeological_files/migrations/0014_auto__add_field_file_requested_operation_type__add_field_file_organiza.py
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r--archaeological_operations/forms.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index 37c35f4be..f9f1095be 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -33,8 +33,8 @@ from django.forms.formsets import formset_factory, DELETION_FIELD_NAME, \
from django.utils.translation import ugettext_lazy as _, pgettext_lazy
from django.utils.safestring import mark_safe
-from ishtar_common.models import valid_id, PersonType, Person, Town, \
- DocumentTemplate, Organization, OrganizationType, get_current_profile, \
+from ishtar_common.models import valid_id, Person, Town, \
+ DocumentTemplate, Organization, get_current_profile, \
person_type_pks_lazy, person_type_pk_lazy, organization_type_pks_lazy, \
organization_type_pk_lazy
@@ -515,7 +515,7 @@ class OperationSelect(TableSelect):
choices=[])
virtual_operation = forms.NullBooleanField(label=_(u"Virtual operation"))
archaeological_sites = forms.IntegerField(
- label=_("Archaelogical site"),
+ label=_("Archaeological site"),
widget=widgets.JQueryAutoComplete(
reverse_lazy('autocomplete-archaeologicalsite'),
associated_model=models.ArchaeologicalSite),
@@ -637,7 +637,7 @@ class OperationFormFileChoice(forms.Form):
associated_models = {'associated_file': File, }
currents = {'associated_file': File}
associated_file = forms.IntegerField(
- label=_(u"Archaelogical file"),
+ label=_(u"Archaeological file"),
widget=widgets.JQueryAutoComplete(
reverse_lazy('autocomplete-file'), associated_model=File),
validators=[valid_id(File)], required=False)
@@ -916,7 +916,7 @@ class OperationFormGeneral(ManageOldType, forms.Form):
msg = ''
if year and max_val:
msg = _(
- u"Operation code already exist for year: %(year)d - use a "
+ u"Operation code already exists for year: %(year)d - use a "
u"value bigger than %(last_val)d") % {
'year': year, 'last_val': max_val}
else:
@@ -930,7 +930,7 @@ class OperationFormModifGeneral(OperationFormGeneral):
required=False)
currents = {'associated_file': File}
associated_file = forms.IntegerField(
- label=_(u"Archaelogical file"),
+ label=_(u"Archaeological file"),
widget=widgets.JQueryAutoComplete(
reverse_lazy('autocomplete-file'),
associated_model=File),
@@ -1143,7 +1143,7 @@ class ArchaeologicalSiteBasicForm(forms.Form):
base_model = 'archaeological_site'
associated_models = {'archaeological_site': models.ArchaeologicalSite}
archaeological_site = forms.IntegerField(
- label=_("Archaelogical site"),
+ label=_("Archaeological site"),
widget=widgets.JQueryAutoComplete(
reverse_lazy('autocomplete-archaeologicalsite'),
associated_model=models.ArchaeologicalSite,
@@ -1158,7 +1158,7 @@ ArchaeologicalSiteFormSet.form_label = _("Archaeological sites")
class ArchaeologicalSiteSelectionForm(forms.Form):
- form_label = _("Associated archaelogical sites")
+ form_label = _("Associated archaeological sites")
archaeological_sites = forms.IntegerField(
widget=widgets.JQueryAutoComplete(
reverse_lazy('autocomplete-archaeologicalsite'),
@@ -1377,7 +1377,7 @@ class AdministrativeActModifForm(object):
msg = ''
if year and max_val:
msg = _(
- u"This index already exist for year: %(year)d - use a "
+ u"This index already exists for year: %(year)d - use a "
u"value bigger than %(last_val)d") % {
'year': year, 'last_val': max_val}
else:
@@ -1403,8 +1403,8 @@ class DocumentGenerationAdminActForm(forms.Form):
def __init__(self, *args, **kwargs):
self.document_type = 'O'
- if 'operation' in kwargs:
- self.document_type = 'O' if kwargs.pop('operation') else 'F'
+ if 'document_type' in kwargs:
+ self.document_type = kwargs.pop('document_type')
self.obj = None
if 'obj' in kwargs:
self.obj = kwargs.pop('obj')