<commit_before>import floppyforms as forms

from django.utils.translation import ugettext as _
from django.utils.safestring import mark_safe
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from django.conf import settings

from froide.helper.widgets import AgreeCheckboxInput

USER_CAN_HIDE_WEB = settings.FROIDE_CONFIG.get("user_can_hide_web", True)


class NewUserForm(forms.Form):
    first_name = forms.CharField(max_length=30,
            label=_('First name'),
            widget=forms.TextInput(attrs={'placeholder': _('First Name'),
                'class': 'inline'}))
    last_name = forms.CharField(max_length=30,
            label=_('Last name'),
            widget=forms.TextInput(attrs={'placeholder': _('Last Name'),
                'class': 'inline'}))
    address = forms.CharField(max_length=300, min_length=10,
            label=_('Mailing Address'),
            help_text=_('Your address will not be displayed publicly.'),
            widget=forms.Textarea(attrs={
                'rows': '3',
                'placeholder': _('Street, Post Code, City'),
            }))
    user_email = forms.EmailField(label=_('Email address'),
            help_text=_('Not public, you will need to confirm this address.'),
            widget=forms.EmailInput(attrs={'placeholder': _('<EMAIL>')}))

    if USER_CAN_HIDE_WEB:
        private = forms.BooleanField(required=False,
                label=_("Hide my name on the web"),<commit_msg>Make postal address optional in account form<commit_after>import floppyforms as forms

from django.utils.translation import ugettext as _
from django.utils.safestring import mark_safe
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from django.conf import settings

from froide.helper.widgets import AgreeCheckboxInput

USER_CAN_HIDE_WEB = settings.FROIDE_CONFIG.get("user_can_hide_web", True)


class NewUserForm(forms.Form):
    first_name = forms.CharField(max_length=30,
            label=_('First name'),
            widget=forms.TextInput(attrs={'placeholder': _('First Name'),
                'class': 'span2'}))
    last_name = forms.CharField(max_length=30,
            label=_('Last name'),
            widget=forms.TextInput(attrs={'placeholder': _('Last Name'),
                'class': 'span2'}))
    address = forms.CharField(max_length=300,
            required=False,
            label=_('Mailing Address'),
            help_text=_('Your address will not be displayed publicly and is only needed in case a public body needs to send you paper.'),
            widget=forms.Textarea(attrs={
                'rows': '3',
                'class': 'span3',
                'placeholder': _('Street, Post Code, City'),
            }))
    user_email = forms.EmailField(label=_('Email address'),
            help_text=_('Not public, you will need to confirm this address.'),
            widget=forms.EmailInput(attrs={'placeholder': _('<EMAIL>')}))

    if USER_CAN_HIDE_WEB:
        private = forms.BooleanField(required=False,
                label=_("Hide my name on the web"),
{'fraction_non_alphanumeric': 0.11806223933269169, 'fraction_numerical': 0.006737247353224254, 'mean_word_length': 3.012870012870013, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5795738', 'n_tokens_mistral': 889, 'n_tokens_neox': 873, 'n_words': 213}