Commit 02b41f64 authored by Alexander Færøy's avatar Alexander Færøy 🍍
Browse files

Add a reason field when people request an account.

parent 7876fa6c
......@@ -38,8 +38,8 @@ delete.short_description = "Delete account requests"
@admin.register(GitlabAccountRequest)
class GitlabAccountRequestAdmin(admin.ModelAdmin):
fields = ('username', 'email', 'approved')
list_display = ('username', 'email', 'approved')
fields = ('username', 'email', 'approved', 'reason')
list_display = ('username', 'email', 'approved', 'reason')
actions = [approve, delete]
def has_delete_permission(self, request, obj=None):
......
......@@ -5,9 +5,10 @@ from django import forms
class GitlabAccountRequest(models.Model):
username = models.CharField(max_length=64)
email = models.EmailField()
reason = models.CharField(max_length=256)
approved = models.BooleanField(default=False)
class GitlabAccountRequestForm(forms.ModelForm):
class Meta:
model = GitlabAccountRequest
fields = ["username", "email"]
fields = ["username", "email", "reason"]
......@@ -12,6 +12,10 @@
<label for="input-username" class="sr-only">Username</label>
<input type="text" id="input-username" name="username" class="form-control" placeholder="Username" required>
<p>Please explain why you want to collaborate with the Tor community</p>
<textarea class="form-control" name="reason" maxlength="256" placeholder="For Example: I wish to report an issue in Tor Browser." rows="3"></textarea>
{% csrf_token %}
<button class="btn btn-success btn-tor" type="submit">Request Account</button>
......
......@@ -58,6 +58,10 @@ body {
margin-bottom: 20px;
}
.form-signin textarea {
margin-bottom: 20px;
}
.btn-tor {
background-color: #68B030;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment