summaryrefslogtreecommitdiff
path: root/ishtar/ishtar_base/forms_common.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar/ishtar_base/forms_common.py')
-rw-r--r--ishtar/ishtar_base/forms_common.py25
1 files changed, 9 insertions, 16 deletions
diff --git a/ishtar/ishtar_base/forms_common.py b/ishtar/ishtar_base/forms_common.py
index 68ab9be5f..7ef1d4070 100644
--- a/ishtar/ishtar_base/forms_common.py
+++ b/ishtar/ishtar_base/forms_common.py
@@ -38,8 +38,7 @@ from ishtar import settings
import models
import widgets
-from forms import Wizard, SearchWizard, FinalForm, FormSet, reverse_lazy, \
- name_validator
+from forms import FinalForm, FormSet, reverse_lazy, name_validator
def get_town_field(label=_(u"Town"), required=True):
help_text = _(u"<p>Type name, department code and/or postal code of the "
@@ -152,9 +151,6 @@ class OrganizationForm(forms.Form):
new_item.save()
return new_item
-class PersonWizard(Wizard):
- model = models.Person
-
class PersonFormSelection(forms.Form):
form_label = _(u"Person search")
associated_models = {'pk':models.Person}
@@ -199,14 +195,11 @@ class PersonForm(forms.Form):
new_item.save()
return new_item
+'''
person_search_wizard = SearchWizard([
('general-person_search', PersonFormSelection)],
url_name='person_search',)
-person_creation_wizard = PersonWizard([
- ('identity-person_creation', PersonForm),
- ('final-person_creation', FinalForm)],
- url_name='person_creation',)
person_modification_wizard = PersonWizard([
@@ -228,9 +221,9 @@ class AccountWizard(Wizard):
return datas
def done(self, request, storage, form_list, **kwargs):
- '''
+ """
Save the account
- '''
+ """
dct = {}
for form in form_list:
if not form.is_valid():
@@ -299,7 +292,7 @@ class AccountWizard(Wizard):
form.is_hidden = False
return form
-
+'''
class AccountForm(forms.Form):
form_label = _("Account")
associated_models = {'pk':models.Person}
@@ -355,13 +348,13 @@ class FinalAccountForm(forms.Form):
def __init__(self, *args, **kwargs):
self.is_hidden = True
return super(FinalAccountForm, self).__init__(*args, **kwargs)
-
+'''
account_management_wizard = AccountWizard([
('selec-account_management', PersonFormSelection),
('account-account_management', AccountForm),
('final-account_management', FinalAccountForm)],
url_name='account_management',)
-
+'''
class TownForm(forms.Form):
form_label = _("Towns")
base_model = 'town'
@@ -432,7 +425,7 @@ ParcelFormSet.form_label = _(u"Parcels")
######################
# Sources management #
######################
-
+'''
class SourceWizard(Wizard):
model = None
def get_extra_model(self, dct, request, storage, form_list):
@@ -441,7 +434,7 @@ class SourceWizard(Wizard):
if 'history_modifier' in dct:
dct.pop('history_modifier')
return dct
-
+'''
class SourceForm(forms.Form):
form_label = _(u"Documentation informations")
associated_models = {'source_type':models.SourceType}