<commit_before>from corehq.apps.commtrack.models import Program
from corehq.apps.users.models import CouchUser
from django import forms
from django.contrib.auth.models import User
from corehq.apps.users.forms import RoleForm, SupplyPointSelectWidget
import re
from corehq.apps.domain.forms import clean_password, max_pwd
from django.core.validators import validate_email
from corehq.apps.domain.models import Domain
from corehq.apps.domain.utils import new_domain_re, new_org_re, website_re
from corehq.apps.orgs.models import Organization
from django.utils.encoding import smart_str
from django.utils.safestring import mark_safe
from dimagi.utils.timezones.fields import TimeZoneField
from dimagi.utils.timezones.forms import TimeZoneChoiceField
from django.utils.translation import ugettext_lazy as _

class NewWebUserRegistrationForm(forms.Form):
    """
    Form for a brand new user, before they've created a domain or done anything on CommCare HQ.
    """
    full_name = forms.CharField(label=_('Full Name'),
                                max_length=User._meta.get_field('first_name').max_length +
                                           User._meta.get_field('last_name').max_length + 1)
    email = forms.EmailField(label=_('Email Address'),
                             max_length=User._meta.get_field('email').max_length,
                             help_text=_('You will use this email to log in.'))
    password = forms.CharField(label=_('Create Password'),
                               max_length=max_pwd,
                               widget=forms.PasswordInput(render_value=False))
    email_opt_out = forms.BooleanField(required=False,
                                       initial=False,
                                       label="",
                                       help_text=_("Opt out of emails about new features and other CommCare updates."))
    # Must be set to False to have the clean_*() routine called
    eula_confirmed = forms.BooleanField(required=False,
                                        label="",
                                        help_text=mark_safe(_(
                                            """I have read and agree to the<commit_msg>make email option opt-in and checked by default<commit_after>from corehq.apps.commtrack.models import Program
from corehq.apps.users.models import CouchUser
from django import forms
from django.contrib.auth.models import User
from corehq.apps.users.forms import RoleForm, SupplyPointSelectWidget
import re
from corehq.apps.domain.forms import clean_password, max_pwd
from django.core.validators import validate_email
from corehq.apps.domain.models import Domain
from corehq.apps.domain.utils import new_domain_re, new_org_re, website_re
from corehq.apps.orgs.models import Organization
from django.utils.encoding import smart_str
from django.utils.safestring import mark_safe
from dimagi.utils.timezones.fields import TimeZoneField
from dimagi.utils.timezones.forms import TimeZoneChoiceField
from django.utils.translation import ugettext_lazy as _

class NewWebUserRegistrationForm(forms.Form):
    """
    Form for a brand new user, before they've created a domain or done anything on CommCare HQ.
    """
    full_name = forms.CharField(label=_('Full Name'),
                                max_length=User._meta.get_field('first_name').max_length +
                                           User._meta.get_field('last_name').max_length + 1)
    email = forms.EmailField(label=_('Email Address'),
                             max_length=User._meta.get_field('email').max_length,
                             help_text=_('You will use this email to log in.'))
    password = forms.CharField(label=_('Create Password'),
                               max_length=max_pwd,
                               widget=forms.PasswordInput(render_value=False))
    email_opt_out = forms.BooleanField(required=False,
                                       initial=True,
                                       label="",
                                       help_text=_("Opt into emails about new features and other CommCare updates."))
    # Must be set to False to have the clean_*() routine called
    eula_confirmed = forms.BooleanField(required=False,
                                        label="",
                                        help_text=mark_safe(_(
                                            """I have read and agree to the
{'fraction_non_alphanumeric': 0.07411579184501013, 'fraction_numerical': 0.0004505519261094841, 'mean_word_length': 2.217391304347826, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '106070', 'n_tokens_mistral': 1113, 'n_tokens_neox': 1096, 'n_words': 297}