From 18dc063ae6f6ce86f4d5543ef66cb5a5a610b50a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Mon, 30 Oct 2017 14:06:07 +0100 Subject: [PATCH] Rename / import some forms in kfet.views --- kfet/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kfet/views.py b/kfet/views.py index ea349361..7129ceec 100644 --- a/kfet/views.py +++ b/kfet/views.py @@ -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)