summaryrefslogtreecommitdiff
path: root/coip/apps/userprofile/forms.py
blob: dd42ccf343695c9aebcccfdc1769f0cf3ae54f0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
'''
Created on Aug 19, 2011

@author: leifj
'''

from form_utils.forms import BetterForm
from django.forms.fields import CharField
from django.forms.widgets import Textarea


class AddSSHKeyForm(BetterForm):
    sshkey = CharField(label='SSH Key',widget=Textarea(attrs={'cols': 60, 'rows': 6}))
    class Meta:   
        fieldsets = [
                     ('key',{'fields':['sshkey'],
                             'legend': 'Please provide your SSH key.',
                             'description': 'Cut and paste your SSH key into the text field. Note that you should only submit the .pub-file and never the private key.',
                             'classes': ['step','submit_step']})
                     ]
        
class AddCertificateForm(BetterForm):
    certificate = CharField(label='PEM X509 Certificate',widget=Textarea(attrs={'cols': 60, 'rows': 6}))
    class Meta:   
        fieldsets = [
                     ('key',{'fields':['certificate'],
                             'legend': 'Please provide your personal certificate.',
                             'description': 'Cut and paste your PEM format X509 Certificate into the text field.',
                             'classes': ['step','submit_step']})
                     ]