Rename / import some forms in kfet.views
This commit is contained in:
parent
345fcf8228
commit
18dc063ae6
1 changed files with 4 additions and 4 deletions
|
@ -34,7 +34,8 @@ from .decorators import teamkfet_required
|
|||
from .forms import (
|
||||
AccountTriForm, AccountBalanceForm, AccountNoTriForm, UserForm,
|
||||
UserRestrictTeamForm, UserGroupForm, AccountForm, UserRestrictForm,
|
||||
AccountPwdForm, AccountNegativeForm, UserRestrictForm, AccountRestrictForm,
|
||||
AccountPwdForm, AccountNegativeForm, ProfileRestrictForm,
|
||||
AccountRestrictForm, ProfileForm,
|
||||
CheckoutForm, CheckoutRestrictForm, CheckoutStatementCreateForm,
|
||||
CheckoutStatementUpdateForm, ArticleForm, ArticleRestrictForm,
|
||||
KPsulOperationGroupForm, KPsulAccountForm, KPsulCheckoutForm,
|
||||
|
@ -208,7 +209,6 @@ def account_create(request):
|
|||
def account_form_set_readonly_fields(user_form, cof_form):
|
||||
user_form.fields['username'].widget.attrs['readonly'] = True
|
||||
cof_form.fields['login_clipper'].widget.attrs['readonly'] = True
|
||||
cof_form.fields['is_cof'].widget.attrs['disabled'] = True
|
||||
|
||||
def get_account_create_forms(request=None, username=None, login_clipper=None,
|
||||
fullname=None):
|
||||
|
@ -352,7 +352,7 @@ def account_update(request, trigramme):
|
|||
user_form = UserRestrictTeamForm(instance=account.user)
|
||||
group_form = UserGroupForm(instance=account.user)
|
||||
account_form = AccountForm(instance=account)
|
||||
cof_form = CofRestrictForm(instance=account.profile)
|
||||
cof_form = ProfileRestrictForm(instance=account.profile)
|
||||
pwd_form = AccountPwdForm()
|
||||
if account.balance < 0 and not hasattr(account, 'negative'):
|
||||
AccountNegative.objects.create(account=account,
|
||||
|
@ -377,7 +377,7 @@ def account_update(request, trigramme):
|
|||
|
||||
if request.user.has_perm('kfet.is_team'):
|
||||
account_form = AccountForm(request.POST, instance=account)
|
||||
cof_form = CofRestrictForm(request.POST, instance=account.profile)
|
||||
cof_form = ProfileRestrictForm(request.POST, instance=account.profile)
|
||||
user_form = UserRestrictTeamForm(request.POST,
|
||||
instance=account.user)
|
||||
group_form = UserGroupForm(request.POST, instance=account.user)
|
||||
|
|
Loading…
Reference in a new issue