summaryrefslogtreecommitdiff
path: root/archaeological_operations/forms.py
diff options
context:
space:
mode:
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')