forked from coala/community
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
community/: Add a joining netlify form
The netlify form will ask some particular inputs that will be used for validating the user - whether the user is eligible to be a organization member. The checks for it have been defined in coala webservices API which will be accepting form-submissions over a cron-job defined. After the user submits the form, a success message will be displayed. Closes coala#89, coala#266
- Loading branch information
Showing
9 changed files
with
259 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
from django import forms | ||
|
||
|
||
class JoinCommunityForm(forms.Form): | ||
|
||
github_username = forms.CharField( | ||
max_length=50, label='GitHub Username', | ||
widget=forms.TextInput( | ||
attrs={ | ||
'placeholder': 'Make sure to NOT enter your github profile url', | ||
'autocomplete': 'off' | ||
} | ||
) | ||
) | ||
gh_first_repo = forms.URLField( | ||
required=False, label='GitHub Personal Repository', | ||
widget=forms.URLInput( | ||
attrs={ | ||
'placeholder': 'A valid github url of your personal repository', | ||
'autocomplete': 'off' | ||
} | ||
) | ||
) | ||
gh_git_training_exercise = forms.URLField( | ||
required=False, label='From which GitHub repository you have done git' | ||
' training?', | ||
widget=forms.URLInput( | ||
attrs={ | ||
'placeholder': 'A valid github url of git training repository', | ||
'autocomplete': 'off' | ||
} | ||
) | ||
) | ||
gh_most_contributed_repo = forms.URLField( | ||
required=False, | ||
label="GitHub Repository to which you've contributed most!", | ||
widget=forms.URLInput( | ||
attrs={ | ||
'placeholder': 'A valid github public repository url', | ||
'autocomplete': 'off' | ||
} | ||
) | ||
) | ||
|
||
gitlab_user_id = forms.IntegerField( | ||
label='GitLab User ID', | ||
widget=forms.NumberInput( | ||
attrs={ | ||
'placeholder': 'Make sure to NOT enter your gitlab profile url', | ||
'autocomplete': 'off' | ||
} | ||
) | ||
) | ||
gl_first_repo_id = forms.IntegerField( | ||
required=False, label='GitLab Personal Project ID', | ||
widget=forms.NumberInput( | ||
attrs={ | ||
'placeholder': 'Your personal gitlab project ID', | ||
'autocomplete': 'off' | ||
} | ||
) | ||
) | ||
gl_git_training_exercise = forms.IntegerField( | ||
required=False, label='From which GitLab project you have done git' | ||
' training?', | ||
widget=forms.NumberInput( | ||
attrs={ | ||
'placeholder': 'A valid project ID of Git training project', | ||
'autocomplete': 'off' | ||
} | ||
) | ||
) | ||
gl_most_contributed_repo_id = forms.IntegerField( | ||
required=False, | ||
label="GitLab Project to which you've contributed most!", | ||
widget=forms.NumberInput( | ||
attrs={ | ||
'placeholder': 'A valid ID of gitlab public project', | ||
'autocomplete': 'off', | ||
} | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.join-community-form .row { | ||
margin: 5px auto; | ||
} | ||
|
||
.join-community-form .row .input-field, | ||
.join-community-form p { | ||
margin: 0 auto; | ||
} | ||
|
||
.join-community-form label{ | ||
font-size: 1.3em; | ||
color: black; | ||
} | ||
|
||
.join-community-form ::placeholder{ | ||
color: gray; | ||
} | ||
|
||
.validation-checkboxes { | ||
padding: 0 15px; | ||
} | ||
|
||
.submit-btn{ | ||
margin: 15px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{% extends 'base.html' %} | ||
{% load staticfiles %} | ||
|
||
{% block add_css_files %} | ||
<link rel="stylesheet" href="{% static 'css/join-community.css' %}"> | ||
{% endblock %} | ||
|
||
{% block add_js_files %} | ||
{% endblock %} | ||
|
||
{% block main-content %} | ||
<div class="web-page-details apply-flex center-content"> | ||
<h3 style="padding-right: 15px">~</h3> | ||
<div class="page-name"> | ||
<h3>Join Community</h3> | ||
</div> | ||
<h3 style="padding-left: 15px">~</h3> | ||
</div> | ||
<div class="apply-flex center-content"> | ||
<form name="{{ join_community_form_name }}" method="post" netlify-honeypot="bot-field" | ||
class="join-community-form" data-netlify="true" action="/?form_submitted=True"> | ||
{% csrf_token %} | ||
{% for field in join_community_form %} | ||
<div class="row"> | ||
<div class="input-field col s12"> | ||
<p> | ||
{{ field.label_tag }} | ||
</p> | ||
{{ field }} | ||
</div> | ||
</div> | ||
{% endfor %} | ||
<div class="validation-checkboxes"> | ||
<p> | ||
<label> | ||
<input type="checkbox" required> | ||
<span> | ||
I have requested access to | ||
<a href="{{ gitlab_newcomers_group_url }}" class="bold-text"> | ||
{{ org.name }} Newcomers Group | ||
</a> | ||
on GitLab | ||
</span> | ||
</label> | ||
</p> | ||
<p> | ||
<label> | ||
<input type="checkbox" required> | ||
<span>I have not created my GitHub or GitLab account in the last 60 minutes.</span> | ||
</label> | ||
</p> | ||
<p> | ||
<label> | ||
<input type="checkbox" required> | ||
<span>All of the above information provided by me has no false entries. If so, I am liable | ||
of getting blacklisted.</span> | ||
</label> | ||
</p> | ||
<p style="display: none"> | ||
<label> | ||
<input type="checkbox" name="bot-field"> | ||
<span>I am a bot</span> | ||
</label> | ||
</p> | ||
<p> | ||
<strong> | ||
Note: You will receive an invite email within 24 hrs, if all the validation checks are passed. | ||
</strong> | ||
</p> | ||
</div> | ||
<div class="apply-flex center-content submit-btn"> | ||
<input class="waves-effect waves-light btn-large large-font" type="submit" value="Submit"> | ||
</div> | ||
</form> | ||
</div> | ||
{% endblock %} |