This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2018-12-10 13:21:42 +00:00
|
|
|
"""passbook core invitation form"""
|
2018-12-10 13:13:18 +00:00
|
|
|
|
|
|
|
from django import forms
|
|
|
|
|
|
|
|
from passbook.core.models import Invite
|
|
|
|
|
|
|
|
|
|
|
|
class InviteForm(forms.ModelForm):
|
|
|
|
"""InviteForm"""
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
|
|
|
|
model = Invite
|
2018-12-10 13:38:44 +00:00
|
|
|
fields = ['created_by', 'expires', 'fixed_username', 'fixed_email']
|
|
|
|
labels = {
|
|
|
|
'fixed_username': "Force user's username (optional)",
|
|
|
|
'fixed_email': "Force user's email (optional)",
|
|
|
|
}
|
|
|
|
widgets = {
|
|
|
|
'created_by': forms.Select(attrs={'disabled': 'disabled'}),
|
|
|
|
'fixed_username': forms.TextInput(),
|
|
|
|
'fixed_email': forms.TextInput(),
|
|
|
|
}
|