summaryrefslogtreecommitdiffstats
path: root/tools/pharos-dashboard/account/forms.py
diff options
context:
space:
mode:
authorJack Morgan <jack.morgan@intel.com>2016-08-22 14:13:06 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-22 14:13:06 +0000
commitc121ae90322dac5cf72e98450c89ff7e5131b20c (patch)
tree51b6c58e102777649940686915da48aab5971fac /tools/pharos-dashboard/account/forms.py
parente4649cce49068942ef754746fdd5bc75636075de (diff)
parent3b5ef3b0a88247eeafeee878de528aad71f9fd4b (diff)
Merge "Split the dashboard into different apps, add tests"
Diffstat (limited to 'tools/pharos-dashboard/account/forms.py')
-rw-r--r--tools/pharos-dashboard/account/forms.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/pharos-dashboard/account/forms.py b/tools/pharos-dashboard/account/forms.py
new file mode 100644
index 00000000..7893867f
--- /dev/null
+++ b/tools/pharos-dashboard/account/forms.py
@@ -0,0 +1,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') \ No newline at end of file