Commit 496d707d authored by stef's avatar stef

[enh] added consent to form

parent b4146019
......@@ -23,7 +23,8 @@ class AddViolation(forms.Form):
contract = forms.CharField(required=True, max_length=256, label=_("Contract"), help_text=_('The specific contract at the ISP provider. (please be as specific as possible)'))
media = forms.ChoiceField(required=True, choices=(('',''),)+tuple(sorted(MEDIA,key=itemgetter(1))), label=_('Is the Internet connection over mobile or fixed line?'))
comment = forms.CharField(required=True, widget=AdvancedEditor(), label=_('Please describe the symptoms you are experiencing.'))
email = forms.EmailField(required=True, label=_('Email (set this to enable saving)'), help_text=_("We need your email to validate your report. Your email address is obligatory, but we will never use your personal data for anything else than checking the submission."))
email = forms.EmailField(required=True, label=_('Email (set this to enable saving)'), help_text=_("We need your email to validate your report. Your email address is obligatory, but we will never use your personal data for anything else than checking the submission. (see next for an optional exception)"))
consent = forms.BooleanField(required=False, label=_("I want to help further"), help_text=_("We need your consent to contact you for clarifications regarding your report. This is optional, but helps us improve the quality of the reports. Thanks!"))
nick = forms.CharField(required=False, label=_("Name or nickname"), help_text=_("We need some name to display that instead of an email address."))
attachments = MultiFileField(required=False, label=_("Attach screenshot, document or any other relevant information."))
resource = forms.ChoiceField(required=False, choices=(('',''),)+tuple(sorted(RESOURCES,key=itemgetter(1))), label=_('What is the affected resource type. (optional)'))
......
......@@ -88,6 +88,7 @@ class Violation(models.Model):
class Comment(models.Model):
submitter_email = models.EmailField()
submitter_name = models.CharField(max_length=20)
consent = models.BooleanField( )
comment = models.TextField()
timestamp = models.DateTimeField()
violation = models.ForeignKey(Violation)
......
......@@ -159,6 +159,7 @@ def add(request):
comment=form.cleaned_data['comment'],
submitter_email=form.cleaned_data['email'],
submitter_name=form.cleaned_data['nick'],
consent=form.cleaned_data['consent'],
timestamp=datetime.now(),
violation=v,
)
......
......@@ -24,6 +24,7 @@ function check1st4() {
$('#id_comment').parent().parent().show().focus();
$('#id_comment_ifr').focus();
$('#id_email').parent().parent().show();
$('#id_consent').parent().parent().show();
$('#id_nick').parent().parent().show();
$('#id_attachments0').parent().parent().show();
$("#save_button").attr('disabled','true').show();
......
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