<commit_before>{% extends "base.html" %}
{% load i18n wagtailsettings_tags %}

{% get_settings %}
{% block content %}
<div class="profiles">
    {% trans "Hello" as headingtext %}
    {% if user.profile.alias %}
        {% with user.profile.alias as alias %}
            {% include "patterns/basics/headings/sp_variations/heading.html" with type="component" htmltag="h1" title=headingtext|add:" "|add:alias %}
        {% endwith %}
    {% else %}
        {% with user|stringformat:"s" as username %}
            {% include "patterns/basics/headings/sp_variations/heading.html" with type="component" htmltag="h1" title=headingtext|add:" "|add:user.gem_profile.migrated_username|default:username %}
        {% endwith %}
    {% endif %}

    {% url "molo.profiles:auth_logout" as link %}
    {% trans "log out" as buttontext %}
    {% include "patterns/basics/buttons/sp_variations/button.html" with type="hyperlink" hyperlink=link text=buttontext %}
    {% trans "Your Profile" as headingtext %}
    {% include "patterns/basics/headings/sp_variations/heading.html" with type="basic" htmltag="h2" title=headingtext %}
    {% with profile_settings=settings.profiles.UserProfilesSettings %}
    <fieldset>
        {% if user.profile.alias %}
            <label>{% trans "When you type comments your name will appear as:" %}
                <span class="input-feedback">{{ user.profile.alias }}</span>
            </label>
        {% else %}
            <label>{% trans "You haven't set a display name, so your comments will appear as 'anonymous'" %}</label>
        {% endif %}
    </fieldset>

    {% if profile_settings.activate_dob and profile_settings.capture_dob_on_reg %}
    <fieldset>
        <label>{% trans "Date of Birth: " %}</label>
        <span class="input-feedback">
            {{ user.profile.date_of_birth | default:"Not set" }}
        </span>
    </fieldset>
    {% endif %}

    {% if profile_settings.activate_gender and profile_settings.capture_gender_on_reg %}
    <fieldset>
        <label>{% trans "Gender:" %}</label>
        <span class="input-feedback">{{ user.gem_profile.get_gender_display | default:"Not set" }}</span>
    </fieldset>
    {% endif %}

    {% if profile_settings.show_mobile_number_field and profile_settings.country_code %}
    <fieldset>
        <label>{% trans "Mobile number:" %}</label>
        <span class="input-feedback">{{ user.profile.mobile_number | default:"Not set" }}</span>
    </fieldset>
    {% endif %}

    {% if profile_settings.show_email_field %}
    <fieldset>
        <label>{% trans "Email Address:" %}</label>
        <span class="input-feedback">{{ user.email | default:"Not set" }}</span>
    </fieldset>
    {% endif %}

    {% if profile_settings.activate_location and profile_settings.capture_location_on_reg %}
    <fieldset>
        <label>{% trans "Location:" %}</label>
        <span class="input-feedback">{{ user.profile.location | default:"Not set" }}</span>
    </fieldset>
    {% endif %}

    {% if profile_settings.activate_education_level and profile_settings.capture_education_level_on_reg %}
    <fieldset>
        <label>{% trans "Education Level:" %}</label>
        <span class="input-feedback">{{ user.profile.education_level | default:"Not set" }}</span>
    </fieldset>
    {% endif %}
    {% endwith %}
    {% url "edit_my_profile" as link %}
    {% trans "Update Profile" as buttontext %}
    {% include "patterns/basics/buttons/sp_variations/button.html" with type="primary" hyperlink=link text=buttontext %}

    <form method="post" id="frmProfilePasswordChange" action="{% url 'molo.profiles:profile_password_change' %}" class="profiles__form profiles__form--block" novalidate>
    {% csrf_token %}
        {% trans "Change Your Pin" as headingtext %}
        {% include "patterns/basics/headings/sp_variations/heading.html" with type="basic" htmltag="h2" title=headingtext %}
        {% if form.errors or form.non_field_errors %}
            {% if form.non_field_errors %}
                {% for error in form.non_field_errors %}
                    <p class="errors">{{ error }}</p>
                {% endfor %}
            {% endif %}
        {% endif %}

        {% if messages %}
        <ul class="error-list">
            {% for message in messages %}
                <li class="error-list__item">{{ message }}</li>
            {% endfor %}
        </ul>
        {% endif %}

        <fieldset>
            <label>{% trans "Old Pin:" %}</label>
            {{ password_change_form.old_password }}
            {{ password_change_form.old_password.errors }}
        </fieldset>
        <fieldset>
            <label>{% trans "New Pin:" %}</label>
            {{ password_change_form.new_password }}
            {{ form.new_password.errors }}
        </fieldset>
        <fieldset>
            <label>{% trans "Confirm Pin:" %}</label>
            {{ password_change_form.confirm_password }}
            {{ form.confirm_password.errors }}
        </fieldset>
        <input type="submit" value="{% trans "Change" %}" class="call-to-action__button call-to-action__button--primary">
    </form>
    <a href="{{request.site.root_page.url}}" class="call-to-action__nav-item-text">{% trans "Home Page" %}</a><commit_msg>update error messages<commit_after>{% extends "base.html" %}
{% load i18n wagtailsettings_tags %}

{% get_settings %}
{% block content %}
<div class="profiles">
    {% trans "Hello" as headingtext %}
    {% if user.profile.alias %}
        {% with user.profile.alias as alias %}
            {% include "patterns/basics/headings/sp_variations/heading.html" with type="component" htmltag="h1" title=headingtext|add:" "|add:alias %}
        {% endwith %}
    {% else %}
        {% with user|stringformat:"s" as username %}
            {% include "patterns/basics/headings/sp_variations/heading.html" with type="component" htmltag="h1" title=headingtext|add:" "|add:user.gem_profile.migrated_username|default:username %}
        {% endwith %}
    {% endif %}

    {% url "molo.profiles:auth_logout" as link %}
    {% trans "log out" as buttontext %}
    {% include "patterns/basics/buttons/sp_variations/button.html" with type="hyperlink" hyperlink=link text=buttontext %}
    {% trans "Your Profile" as headingtext %}
    {% include "patterns/basics/headings/sp_variations/heading.html" with type="basic" htmltag="h2" title=headingtext %}
    {% with profile_settings=settings.profiles.UserProfilesSettings %}
    <fieldset>
        {% if user.profile.alias %}
            <label>{% trans "When you type comments your name will appear as:" %}
                <span class="input-feedback">{{ user.profile.alias }}</span>
            </label>
        {% else %}
            <label>{% trans "You haven't set a display name, so your comments will appear as 'anonymous'" %}</label>
        {% endif %}
    </fieldset>

    {% if profile_settings.activate_dob and profile_settings.capture_dob_on_reg %}
    <fieldset>
        <label>{% trans "Date of Birth: " %}</label>
        <span class="input-feedback">
            {{ user.profile.date_of_birth | default:"Not set" }}
        </span>
    </fieldset>
    {% endif %}

    {% if profile_settings.activate_gender and profile_settings.capture_gender_on_reg %}
    <fieldset>
        <label>{% trans "Gender:" %}</label>
        <span class="input-feedback">{{ user.gem_profile.get_gender_display | default:"Not set" }}</span>
    </fieldset>
    {% endif %}

    {% if profile_settings.show_mobile_number_field and profile_settings.country_code %}
    <fieldset>
        <label>{% trans "Mobile number:" %}</label>
        <span class="input-feedback">{{ user.profile.mobile_number | default:"Not set" }}</span>
    </fieldset>
    {% endif %}

    {% if profile_settings.show_email_field %}
    <fieldset>
        <label>{% trans "Email Address:" %}</label>
        <span class="input-feedback">{{ user.email | default:"Not set" }}</span>
    </fieldset>
    {% endif %}

    {% if profile_settings.activate_location and profile_settings.capture_location_on_reg %}
    <fieldset>
        <label>{% trans "Location:" %}</label>
        <span class="input-feedback">{{ user.profile.location | default:"Not set" }}</span>
    </fieldset>
    {% endif %}

    {% if profile_settings.activate_education_level and profile_settings.capture_education_level_on_reg %}
    <fieldset>
        <label>{% trans "Education Level:" %}</label>
        <span class="input-feedback">{{ user.profile.education_level | default:"Not set" }}</span>
    </fieldset>
    {% endif %}
    {% endwith %}
    {% url "edit_my_profile" as link %}
    {% trans "Update Profile" as buttontext %}
    {% include "patterns/basics/buttons/sp_variations/button.html" with type="primary" hyperlink=link text=buttontext %}

    <form method="post" id="frmProfilePasswordChange" action="{% url 'molo.profiles:profile_password_change' %}" class="profiles__form profiles__form--block" novalidate>
    {% csrf_token %}
        {% trans "Change Your Pin" as headingtext %}
        {% include "patterns/basics/headings/sp_variations/heading.html" with type="basic" htmltag="h2" title=headingtext %}
        {% if form.errors or form.non_field_errors %}
            {% if form.non_field_errors %}
                {% for error in form.non_field_errors %}
                    <p class="errors">{{ error }}</p>
                {% endfor %}
            {% endif %}
        {% endif %}

        <fieldset>
            <label>{% trans "Old Pin:" %}</label>
            {{ password_change_form.old_password }}
            {{ password_change_form.old_password.errors }}
        </fieldset>
        <fieldset>
            <label>{% trans "New Pin:" %}</label>
            {{ password_change_form.new_password }}
            {{ form.new_password.errors }}
        </fieldset>
        <fieldset>
            <label>{% trans "Confirm Pin:" %}</label>
            {{ password_change_form.confirm_password }}
            {{ form.confirm_password.errors }}
        </fieldset>
        <input type="submit" value="{% trans "Change" %}" class="call-to-action__button call-to-action__button--primary">
    </form>
    <a href="{{request.site.root_page.url}}" class="call-to-action__nav-item-text">{% trans "Home Page" %}</a>
{'fraction_non_alphanumeric': 0.15607275572071191, 'fraction_numerical': 0.001173479366321142, 'mean_word_length': 2.8753315649867375, 'pattern_counts': {'":': 0, '<': 135, '<?xml version=': 0, '>': 135, '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': '2135177', 'n_tokens_mistral': 3273, 'n_tokens_neox': 2985, 'n_words': 638}