summaryrefslogtreecommitdiffstats
path: root/pharos-dashboard/account/forms.py
blob: 7893867f686f48f3d45b6359c172030142db83b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import django.forms as forms
import pytz as pytz

from registration.forms import RegistrationForm as BaseRegistrationForm


class AccountSettingsForm(forms.Form):
    fields = ['first_name', 'last_name', 'email', 'company', 'ssh_public_key', 'pgp_public_key',
              'timezone']

    first_name = forms.CharField(max_length=30)
    last_name = forms.CharField(max_length=30)
    email = forms.EmailField()
    company = forms.CharField(max_length=30)
    ssh_public_key = forms.CharField(max_length=2048, widget=forms.Textarea)
    pgp_public_key = forms.CharField(max_length=2048, widget=forms.Textarea)
    timezone = forms.ChoiceField(choices=[(x, x) for x in pytz.common_timezones], initial='UTC')