Project

General

Profile

« Previous | Next » 

Revision e8136392

Added by Serghei Mihai almost 9 years ago

local accounts add and edit forms

View differences:

uauth/organization/forms.py
1
from django.utils.translation import ugettext as _
2
from django import forms
3

  
4
from .models import LocalAccount
5

  
6

  
7
class LocalAccountForm(forms.ModelForm):
8

  
9
    class Meta:
10
        exclude = ('organization', )
11
        model = LocalAccount
12
        widgets = {
13
            'expiration_date': forms.DateInput(attrs={'class': 'datepicker'}),
14
            'password': forms.PasswordInput
15
        }
16

  
17

  
18
class LocalAccountCreateForm(LocalAccountForm):
19
    accounts_number = forms.IntegerField(_('Number of accounts to create'), required=False)
20
    accounts_number_start = forms.IntegerField(_('First number of multiple accounts'), required=False)

Also available in: Unified diff