Skip to content
Permalink
Browse files

Users must acknowledge data publication

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 16, 2018
1 parent 1272c87 commit 990ea4ddf821369f8fb2c3473467356ac29e68c0
Showing with 12 additions and 9 deletions.
  1. +2 −1 sites/forms.py
  2. +2 −2 sites/views.py
  3. +7 −6 templates/add.html
  4. +1 −0 templates/tos.html
@@ -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)
@@ -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')
@@ -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">
@@ -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>
@@ -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.