Skip to content

Commit

Permalink
Users must acknowledge data publication
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 16, 2018
1 parent 1272c87 commit 990ea4d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
3 changes: 2 additions & 1 deletion sites/forms.py
Expand Up @@ -12,4 +12,5 @@ class AddForm(forms.Form):
description = forms.CharField(label="Description", max_length=250)
sourcelink = forms.URLField(label="Site source", max_length=512, required=False)
languages = forms.MultipleChoiceField(label="Languages", required=False, choices=make_choices)
tos = forms.BooleanField(label="Accept TOS")
tos = forms.BooleanField(label="Accept TOS", required=True)
ack_publishing = forms.BooleanField(label="Accept publishing", required=True)
4 changes: 2 additions & 2 deletions sites/views.py
Expand Up @@ -131,8 +131,8 @@ def add(request):
return render(request, 'add-ack.html', context)
else:
context['reason'] = form.errors
if 'tos' in form.errors:
context['reason'] = 'tos'
if 'tos' in form.errors or 'ack_publishing' in form.errors:
context['reason'] = 'You need to accept the TOS and acknowledge data publication.'
return render(request, 'add-error.html', context)
else:
context['langs'] = Language.objects.order_by('name')
Expand Down
13 changes: 7 additions & 6 deletions templates/add.html
Expand Up @@ -16,8 +16,7 @@
<div class="col-lg-10">
<input type="text" class="form-control" name="author" id="inputAuthor" placeholder="Author"
required maxlength="100">
<span class="help-block">Pseudonym, real name, what floats your
boat.</span>
<span class="help-block">Don’t use an e-mail; feel free to use a pseudonym.</span>
</div>
</div>
<div class="form-group form-row">
Expand Down Expand Up @@ -54,17 +53,19 @@
</select>
<span class="help-block">Languages your site is in. (choose at
least one — use <strong>Ctrl</strong>/<strong>Cmd</strong> to choose multiple)</span>
<p class="text-warning">If your language is not on the list,
<p class="text-warning mb-0">If your language is not on the list,
please <a
href="https://github.com/getnikola/nikola-users/issues">report
an Issue on GitHub</a>.</p>
</div>
</div>
<div class="form-group form-row">
<div class="offset-lg-2 col-lg-10">
<label class="checkbox">
<input name="tos" type="checkbox" required> I agree to the <a href="/tos/">Terms of Service and Privacy Policy</a>.
</label><br>
<label class="checkbox mb-3">
<input name="tos" type="checkbox" required> I agree to the <a href="/tos/">Terms of Service and Privacy Policy</a>.</label>
<label class="checkbox mb-3">
<input name="ack_publishing" type="checkbox" required> I also acknowledge that all the information I submit will be displayed publicly. You may revise or remove all information at any time by e-mailing the site administrators.
</label>
<button type="submit" class="btn btn-primary">Request addition</button>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions templates/tos.html
Expand Up @@ -27,5 +27,6 @@ <h2>Content</h2>
content.</li>
<li>You must not post spam.</li>
<li>Content posted by you must not harm the Service in any way.</li>
<li>By submitting any information, you acknowldge that all information will be displayed publicly. You may revise or remove all information at any time by e-mailing the site administrators.</li>
</ol>
{% endblock %}

0 comments on commit 990ea4d

Please sign in to comment.