<commit_before>{% extends "static_header.html" %}
{% load static %}
{% load semanticui %}
{% block body %}
    <script src="{% static 'jquery.address.js' %}"></script>
    <script>
        $(document)
            .ready(function () {
                let tabs = $('.link.list .SettingsItem');
                tabs
                    .tab({
                        history: true,
                        historyType: 'hash',
                        path: '/settings/',
                        debug: true
                    })
                ;
                $('#email_form')
                    .form({
                        fields: {
                            email: {
                                identifier: 'email',
                                rules: [
                                    {
                                        type: 'email'
                                    }
                                ]
                            },
                            match: {
                                identifier: 'email_check',
                                rules: [
                                    {
                                        type: 'match[email]',
                                        prompt: 'Both emails must match.'
                                    }
                                ]
                            }
                        },
                        inline: true,
                        on : 'blur'
                    });
                $('#team_add_form')
                    .form({
                        fields: {
                            comp: {
                                identifier: 'competition',
                                rules: [
                                    {
                                        type: 'empty'
                                    }
                                ]
                            },
                            team_num: {
                                identifier: 'team_num',
                                rules: [
                                    {
                                        type: 'empty'
                                    }
                                ]
                            },
                            relationship: {
                                identifier: 'relationship',
                                rules: [
                                    {
                                        type: 'empty'
                                    }
                                ]
                            }
                        },
                        inline: true,
                        on : 'blur'
                        }

                    )
                $('select.dropdown')
                    .dropdown()
                ;
            })
        ;
    </script>
    <div class="ui stackable two column divided grid">
        <div class="two wide column">
            <div class="ui link list">
                <a class="item SettingsItem" data-tab="main">Settings</a>
                <a class="item SettingsItem" data-tab="teams">Teams</a>
                <a class="item SettingsItem" data-tab="profile">Profile</a>
            </div>
        </div>
        <div class="fourteen wide column">
            <div class="ui tab segment" data-tab="main">
                <h1>General Settings</h1>
                <a class="fluid ui animated button" href="{% url 'resetLoggedInLink' %}">
                    <div class="visible content">Change Password</div>
                    <div class="hidden content">Make sure your email is set correctly.</div>
                </a>
                <div class="ui divider"></div>
                <form method="POST" action="{% url 'resetEmail' %}" class="ui form" id="email_form">
                    {% csrf_token %}
                    <div class="field">
                        <label>Email</label>
                        <input type="email" name="email" placeholder="Enter your email">
                    </div>
                    <div class="field">
                        <input type="email" name="email_check" placeholder="Email, again, to confirm">
                    </div>
                    <button class="fluid ui button">
                        Change Email
                    </button>
                </form>
                <div class="ui divider"></div>
                <form method="POST" action="{% url 'resetUsername' %}" class="ui form warning">
                    {% csrf_token %}
                    <div class="field">
                        <label>Username</label>
                        <input type="text" name="username" placeholder="Enter your new username">
                    </div>
                    <div class="ui warning message">
                        <div class="header">Warning!</div>
                        <ul class="list">
                            <li>All links on the site will automatically switch to your new username.</li>
                            <li>Any bookmarked links will still reference your old username and will break.</li>
                            <li>Your login will change to your new username. Make sure to update your password manager, if you have one.</li>
                        </ul>
                    </div>
                    <button class="fluid ui button">
                        Change Username
                    </button>
                </form>
            </div>
            <div class="ui tab segments" data-tab="teams">
                <div class="ui segment">
                    <h1>My Teams</h1>
                    <div class="ui cards">
                        {% for team in teams %}
                        <div class="card">
                            <a href="{% url 'teamDetail' team.team.competition.abbreviation team.team.team_num %}" class="content">
                                <div class="header">{{ team.team.competition.full_name }} Team {{ team.team.team_num }}</div>
                                <div class="meta">
                                    <span>{{ team.team.nickname }}</span>
                                </div>
                            </a>
                            <div class="extra content">
                                Relationship: {{ team.relationship }}
                            </div>
                            {% if team.team.added_manually %}<commit_msg>Settings changes<commit_after>{% extends "static_header.html" %}
{% load static %}
{% load semanticui %}
{% block body %}
    <script src="{% static 'jquery.address.js' %}"></script>
    <script>
        $(document)
            .ready(function () {
                let tabs = $('.vertical.menu .SettingsItem');
                tabs
                    .tab({
                        history: true,
                        historyType: 'hash',
                        path: '/settings/',
                        debug: true
                    })
                ;
                $('#email_form')
                    .form({
                        fields: {
                            email: {
                                identifier: 'email',
                                rules: [
                                    {
                                        type: 'email'
                                    }
                                ]
                            },
                            match: {
                                identifier: 'email_check',
                                rules: [
                                    {
                                        type: 'match[email]',
                                        prompt: 'Both emails must match.'
                                    }
                                ]
                            }
                        },
                        inline: true,
                        on : 'blur'
                    });
                $('#team_add_form')
                    .form({
                        fields: {
                            comp: {
                                identifier: 'competition',
                                rules: [
                                    {
                                        type: 'empty'
                                    }
                                ]
                            },
                            team_num: {
                                identifier: 'team_num',
                                rules: [
                                    {
                                        type: 'empty'
                                    }
                                ]
                            },
                            relationship: {
                                identifier: 'relationship',
                                rules: [
                                    {
                                        type: 'empty'
                                    }
                                ]
                            }
                        },
                        inline: true,
                        on : 'blur'
                        }

                    )
                $('select.dropdown')
                    .dropdown()
                ;
            })
        ;
    </script>
    <div class="ui stackable two column divided grid">
        <div class="two wide column">
            <div class="ui fluid secondary vertical menu">
                <a class="item SettingsItem" data-tab="main">Settings</a>
                <a class="item SettingsItem" data-tab="teams">Teams</a>
                <a class="item SettingsItem" data-tab="profile">Profile</a>
            </div>
        </div>
        <div class="fourteen wide column">
            <div class="ui tab segment" data-tab="main">
                <h1>General Settings</h1>
                <a class="fluid ui animated button" href="{% url 'resetLoggedInLink' %}">
                    <div class="visible content">Change Password</div>
                    <div class="hidden content">Make sure your email is set correctly.</div>
                </a>
                <div class="ui divider"></div>
                <form method="POST" action="{% url 'resetEmail' %}" class="ui form" id="email_form">
                    {% csrf_token %}
                    <div class="field">
                        <label>Email</label>
                        <input type="email" name="email" placeholder="Enter your email">
                    </div>
                    <div class="field">
                        <input type="email" name="email_check" placeholder="Email, again, to confirm">
                    </div>
                    <button class="fluid ui button">
                        Change Email
                    </button>
                </form>
                <div class="ui divider"></div>
                <form method="POST" action="{% url 'resetUsername' %}" class="ui form warning">
                    {% csrf_token %}
                    <div class="field">
                        <label>Username</label>
                        <input type="text" name="username" placeholder="Enter your new username">
                    </div>
                    <div class="ui warning message">
                        <div class="header">Warning!</div>
                        <ul class="list">
                            <li>All links on the site will automatically switch to your new username.</li>
                            <li>Any bookmarked links will still reference your old username and will break.</li>
                            <li>Your login will change to your new username. Make sure to update your password manager, if you have one.</li>
                        </ul>
                    </div>
                    <button class="fluid ui button">
                        Change Username
                    </button>
                </form>
            </div>
            <div class="ui tab segments" data-tab="teams">
                <div class="ui segment">
                    <h1>My Teams</h1>
                    <div class="ui three stackable cards">
                        {% for team in teams %}
                        <div class="fluid card">
                            <a href="{% url 'teamDetail' team.team.competition.abbreviation team.team.team_num %}" class="content">
                                <div class="header">{{ team.team.competition.full_name }} Team {{ team.team.team_num }}</div>
                                <div class="meta">
                                    <span>{{ team.team.nickname }}</span>
                                </div>
                            </a>
                            <div class="extra content">
                                Relationship: {{ team.relationship }}
                            </div>
                            {% if team.team.added_manually %}
{'fraction_non_alphanumeric': 0.09903883121876202, 'fraction_numerical': 0.0006151480199923107, 'mean_word_length': 0.7233337750099377, 'pattern_counts': {'":': 0, '<': 161, '<?xml version=': 0, '>': 161, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 34, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6924879', 'n_tokens_mistral': 2797, 'n_tokens_neox': 2523, 'n_words': 640}