diff options
Diffstat (limited to 'ishtar/furnitures/forms.py')
| -rw-r--r-- | ishtar/furnitures/forms.py | 24 | 
1 files changed, 15 insertions, 9 deletions
diff --git a/ishtar/furnitures/forms.py b/ishtar/furnitures/forms.py index f0b891961..cb94e2889 100644 --- a/ishtar/furnitures/forms.py +++ b/ishtar/furnitures/forms.py @@ -396,6 +396,15 @@ _(u"Enter a valid name consisting of letters, spaces and hyphens."), 'invalid')  class PersonWizard(Wizard):      model = models.Person +class PersonFormSelection(forms.Form): +    form_label = _("Person") +    associated_models = {'pk':models.Person} +    currents = {'pk':models.Person} +    pk = forms.IntegerField(label=_("Person"), +         widget=widgets.JQueryAutoComplete(reverse_lazy('autocomplete-person'), +                                           associated_model=models.Person), +         validators=[models.valid_id(models.Person)]) +  class PersonForm(forms.Form):      form_label = _("Identity")      associated_models = {'attached_to':models.Organization, @@ -423,6 +432,12 @@ person_creation_wizard = PersonWizard([                          ('final-person_creation', FinalForm)],                           url_name='person_creation',) +person_modification_wizard = PersonWizard([ +                          ('selec-person_modification', PersonFormSelection), +                          ('identity-person_modification', PersonForm), +                          ('final-person_modification', FinalForm)], +                          url_name='person_modification',) +  class AccountWizard(Wizard):      model = models.Person      def get_formated_datas(self, forms): @@ -502,15 +517,6 @@ class AccountWizard(Wizard):          return form -class PersonFormSelection(forms.Form): -    form_label = _("Person") -    associated_models = {'pk':models.Person} -    currents = {'pk':models.Person} -    pk = forms.IntegerField(label=_("Person"), -         widget=widgets.JQueryAutoComplete(reverse_lazy('autocomplete-person'), -                                           associated_model=models.Person), -         validators=[models.valid_id(models.Person)]) -  class AccountForm(forms.Form):      form_label = _("Account")      associated_models = {'pk':models.Person}  | 
