|
| 1 | +from django import forms |
| 2 | + |
| 3 | + |
| 4 | +class JoinCommunityForm(forms.Form): |
| 5 | + |
| 6 | + github_username = forms.CharField( |
| 7 | + max_length=50, label='GitHub Username', |
| 8 | + widget=forms.TextInput( |
| 9 | + attrs={ |
| 10 | + 'placeholder': 'Make sure to NOT enter your github profile url', |
| 11 | + 'autocomplete': 'off' |
| 12 | + } |
| 13 | + ) |
| 14 | + ) |
| 15 | + gh_first_repo = forms.URLField( |
| 16 | + required=False, label='GitHub Personal Repository', |
| 17 | + widget=forms.URLInput( |
| 18 | + attrs={ |
| 19 | + 'placeholder': 'A valid github url of your personal repository', |
| 20 | + 'autocomplete': 'off' |
| 21 | + } |
| 22 | + ) |
| 23 | + ) |
| 24 | + gh_git_training_exercise = forms.URLField( |
| 25 | + required=False, label='From which GitHub repository you have done git' |
| 26 | + ' training?', |
| 27 | + widget=forms.URLInput( |
| 28 | + attrs={ |
| 29 | + 'placeholder': 'A valid github url of git training repository', |
| 30 | + 'autocomplete': 'off' |
| 31 | + } |
| 32 | + ) |
| 33 | + ) |
| 34 | + gh_most_contributed_repo = forms.URLField( |
| 35 | + required=False, |
| 36 | + label="GitHub Repository to which you've contributed most!", |
| 37 | + widget=forms.URLInput( |
| 38 | + attrs={ |
| 39 | + 'placeholder': 'A valid github public repository url', |
| 40 | + 'autocomplete': 'off' |
| 41 | + } |
| 42 | + ) |
| 43 | + ) |
| 44 | + |
| 45 | + gitlab_user_id = forms.IntegerField( |
| 46 | + label='GitLab User ID', |
| 47 | + widget=forms.NumberInput( |
| 48 | + attrs={ |
| 49 | + 'placeholder': 'Make sure to NOT enter your gitlab profile url', |
| 50 | + 'autocomplete': 'off' |
| 51 | + } |
| 52 | + ) |
| 53 | + ) |
| 54 | + gl_first_repo_id = forms.IntegerField( |
| 55 | + required=False, label='GitLab Personal Project ID', |
| 56 | + widget=forms.NumberInput( |
| 57 | + attrs={ |
| 58 | + 'placeholder': 'Your personal gitlab project ID', |
| 59 | + 'autocomplete': 'off' |
| 60 | + } |
| 61 | + ) |
| 62 | + ) |
| 63 | + gl_git_training_exercise = forms.IntegerField( |
| 64 | + required=False, label='From which GitLab project you have done git' |
| 65 | + ' training?', |
| 66 | + widget=forms.NumberInput( |
| 67 | + attrs={ |
| 68 | + 'placeholder': 'A valid project ID of Git training project', |
| 69 | + 'autocomplete': 'off' |
| 70 | + } |
| 71 | + ) |
| 72 | + ) |
| 73 | + gl_most_contributed_repo_id = forms.IntegerField( |
| 74 | + required=False, |
| 75 | + label="GitLab Project to which you've contributed most!", |
| 76 | + widget=forms.NumberInput( |
| 77 | + attrs={ |
| 78 | + 'placeholder': 'A valid ID of gitlab public project', |
| 79 | + 'autocomplete': 'off', |
| 80 | + } |
| 81 | + ) |
| 82 | + ) |
0 commit comments