#NEWLINE# def __init__( self , * args , **kwargs ) : #NEWLINE# #INDENT# self . user = kwargs . pop ( 'user' , None ) #NEWLINE# super ( ProfileForm , self ) . __init__ ( * args , ** kwargs ) #NEWLINE# self . fields [ 'full_name' ] = forms . CharField ( max_length = 30 , initial = self . user . full_name , widget = forms . TextInput ( attrs = { #NEWLINE# #INDENT# 'placeholder' : _ ( 'Name' ) , #NEWLINE# #UNINDENT# } ) , error_messages = { #NEWLINE# #INDENT# 'required' : _ ( 'Please enter your full name.' ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . fields [ 'bio' ] = forms . CharField ( initial = self . user . bio , widget = forms . Textarea ( attrs = { #NEWLINE# #INDENT# 'class' : 'bio' , #NEWLINE# 'placeholder' : _ ( 'Add some details about yourself...' ) , #NEWLINE# 'rows' : 'auto' , #NEWLINE# #UNINDENT# } ) , required = False ) #NEWLINE# roles = Role . objects . all ( ) #NEWLINE# self . fields [ 'roles' ] = RoleModelMultipleChoiceField ( initial = self . user . roles . all ( ) , queryset = roles , widget = forms . CheckboxSelectMultiple ( ) , required = False )