<commit_before>
<%inherit file="base.mako"/>

<%def name="title()">Account Settings</%def>

<%def name="stylesheets()">
   ${parent.stylesheets()}
   <link rel="stylesheet" href='/static/css/pages/account-setting-page.css'>
</%def>

<%def name="content()">
    <% from website import settings %>
    <div id="accountSettings">
        <h2 class="page-header">Settings</h2>
        <div class="row">
            <div class="col-md-3 affix-parent">
              <%include file="include/profile/settings_navpanel.mako" args="current_page='account'"/>
            </div>
            <div class="col-md-6">
                <div id="connectedEmails" class="panel panel-default scripted">
                    <div class="panel-heading clearfix"><h3 class="panel-title">Connected Emails</h3></div>
                    <div class="panel-body">
                        <table class="table">
                            <thead>
                                <tr>
                                    <th colspan="2">Primary Email</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td><span data-bind="text: profile().primaryEmail().address"></span></td>
                                    <td></td>
                                </tr>
                            </tbody>
                        </table>

                        <table class="table">
                            <thead>
                                <tr>
                                    <th colspan="3">Alternate Emails</th>
                                </tr>
                            </thead>
                            <tbody data-bind="foreach: profile().alternateEmails()">
                                <tr>
                                    <td style="word-break: break-all;"><span data-bind="text: $data.address"></span></td>
                                    <td style="width:150px;"><a data-bind="click: $parent.makeEmailPrimary.bind($parent)">make&nbsp;primary</a></td>
                                    <td style="width:50px;"><a data-bind="click: $parent.removeEmail.bind($parent)"><i class="fa fa-times text-danger"></i></a></td>
                                </tr>
                            </tbody>
                        </table>
                        <table class="table">
                            <thead>
                                <tr>
                                    <th colspan="3">Unconfirmed Emails</th>
                                </tr>
                            </thead>
                            <tbody>
                                <!-- ko foreach: profile().unconfirmedEmails() -->
                                <tr>
                                    <td style="word-break: break-all;"><span data-bind="text: $data.address"></span></td>
                                    <td style="width:150px;"><a data-bind="click: $parent.resendConfirmation.bind($parent)">resend&nbsp;confirmation</a></td>
                                    <td style="width:50px;" ><a data-bind="click: $parent.removeEmail.bind($parent)"><i class="fa fa-times text-danger"></i></a></td>
                                </tr>
                                <!-- /ko -->
                                <tr>
                                    <td colspan="3">
                                        <form data-bind="submit: addEmail">
                                            <p>
                                            To merge an existing account with this one or to log in with multiple email addresses, add an alternate email address below.
                                            <span class="fa fa-info-circle" data-bind="tooltip: {title: 'Merging accounts will move all projects and components associated with two emails into one account. All projects and components will be displayed under the email address listed as primary.',
                                             placement: 'bottom', container : 'body'}"></span>
                                            </p>
                  
                                            <div class="form-group">
                                                ## email input verification is not supported on safari
                                              <input placeholder="Email address" type="email" data-bind="value: emailInput" class="form-control" required maxlength="254">
                                            </div>
                                            <input type="submit" value="Add email" class="btn btn-success">
                                        </form>

                                        <div class="help-block">
                                            <p data-bind="html: message, attr: {class: messageClass}"></p>
                                        </div>
                                    </td>

                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div id="changePassword" class="panel panel-default">
                    <div class="panel-heading clearfix"><h3 class="panel-title">Change Password</h3></div>
                    <div class="panel-body">
                        <form id="changePasswordForm" role="form" action="${ web_url_for('user_account_password') }" method="post">
                            <div class="form-group">
                                <label for="old_password">Old password</label>
                                <input
                                    type="password"
                                    class="form-control"
                                    id="changePassword"
                                    placeholder="<PASSWORD>"
                                    name="old_password"
                                    data-bind="
                                        textInput: oldPassword,
                                        value: oldPassword,
                                        event: {
                                            blur: trim.bind($data, password)
                                        }"
                                >
                                <p class="help-block" data-bind="validationMessage: oldPassword" style="display: none;"></p>
                            </div>
                            <div class="form-group">
                                <label for="new_password">New password</label>
                                <input
                                    type="password"
                                    class="form-control"
                                    id="resetPassword"
                                    placeholder="<PASSWORD>"
                                    name="new_password"
                                    data-bind="
                                        textInput: typedPassword,
                                        value: password,
                                        event: {
                                            blur: trim.bind($data, password)
                                        }"
                                >
                                <div class="progress create-password">
                                    <div class="progress-bar" role="progressbar" data-bind="attr: passwordComplexityBar"></div>
                                </div>
                                <p class="help-block" data-bind="validationMessage: password" style="display: none;"></p>
                                <p class="help-block" data-bind="text: passwordFeedback"></p>

                            </div>
                            <div class="form-group">
                                <label for="confirm_password">Confirm new password</label>
                                <input
                                    type="password"
                                    class="form-control"
                                    id="resetPasswordConfirmation"
                                    placeholder="Verify Password"
                                    name="confirm_password"
                                    data-bind="
                                        value: passwordConfirmation,
                                        event: {
                                            blur: trim.bind($data, passwordConfirmation)
                                        }"
                                >
                                <p class="help-block" data-bind="validationMessage: passwordConfirmation" style="display: none;"></p>
                            </div>
                            <button type="submit" class="btn btn-primary">Update password</button>
                        </form>
                    </div><commit_msg>Also disable button for a bit<commit_after>
<%inherit file="base.mako"/>

<%def name="title()">Account Settings</%def>

<%def name="stylesheets()">
   ${parent.stylesheets()}
   <link rel="stylesheet" href='/static/css/pages/account-setting-page.css'>
</%def>

<%def name="content()">
    <% from website import settings %>
    <div id="accountSettings">
        <h2 class="page-header">Settings</h2>
        <div class="row">
            <div class="col-md-3 affix-parent">
              <%include file="include/profile/settings_navpanel.mako" args="current_page='account'"/>
            </div>
            <div class="col-md-6">
                <div id="connectedEmails" class="panel panel-default scripted">
                    <div class="panel-heading clearfix"><h3 class="panel-title">Connected Emails</h3></div>
                    <div class="panel-body">
                        <table class="table">
                            <thead>
                                <tr>
                                    <th colspan="2">Primary Email</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td><span data-bind="text: profile().primaryEmail().address"></span></td>
                                    <td></td>
                                </tr>
                            </tbody>
                        </table>

                        <table class="table">
                            <thead>
                                <tr>
                                    <th colspan="3">Alternate Emails</th>
                                </tr>
                            </thead>
                            <tbody data-bind="foreach: profile().alternateEmails()">
                                <tr>
                                    <td style="word-break: break-all;"><span data-bind="text: $data.address"></span></td>
                                    <td style="width:150px;"><a data-bind="click: $parent.makeEmailPrimary.bind($parent)">make&nbsp;primary</a></td>
                                    <td style="width:50px;"><a data-bind="click: $parent.removeEmail.bind($parent)"><i class="fa fa-times text-danger"></i></a></td>
                                </tr>
                            </tbody>
                        </table>
                        <table class="table">
                            <thead>
                                <tr>
                                    <th colspan="3">Unconfirmed Emails</th>
                                </tr>
                            </thead>
                            <tbody>
                                <!-- ko foreach: profile().unconfirmedEmails() -->
                                <tr>
                                    <td style="word-break: break-all;"><span data-bind="text: $data.address"></span></td>
                                    <td style="width:150px;"><a data-bind="click: $parent.resendConfirmation.bind($parent)">resend&nbsp;confirmation</a></td>
                                    <td style="width:50px;" ><a data-bind="click: $parent.removeEmail.bind($parent)"><i class="fa fa-times text-danger"></i></a></td>
                                </tr>
                                <!-- /ko -->
                                <tr>
                                    <td colspan="3">
                                        <form data-bind="submit: addEmail">
                                            <p>
                                            To merge an existing account with this one or to log in with multiple email addresses, add an alternate email address below.
                                            <span class="fa fa-info-circle" data-bind="tooltip: {title: 'Merging accounts will move all projects and components associated with two emails into one account. All projects and components will be displayed under the email address listed as primary.',
                                             placement: 'bottom', container : 'body'}"></span>
                                            </p>
                  
                                            <div class="form-group">
                                                ## email input verification is not supported on safari
                                              <input placeholder="Email address" type="email" data-bind="value: emailInput" class="form-control" required maxlength="254">
                                            </div>
                                            <input type="submit" value="Add email" class="btn btn-success">
                                        </form>

                                        <div class="help-block">
                                            <p data-bind="html: message, attr: {class: messageClass}"></p>
                                        </div>
                                    </td>

                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div id="changePassword" class="panel panel-default">
                    <div class="panel-heading clearfix"><h3 class="panel-title">Change Password</h3></div>
                    <div class="panel-body">
                        <form id="changePasswordForm" role="form" action="${ web_url_for('user_account_password') }" method="post">
                            <div class="form-group">
                                <label for="old_password">Old password</label>
                                <input
                                    type="password"
                                    class="form-control"
                                    id="changePassword"
                                    placeholder="Old Password"
                                    name="old_password"
                                    data-bind="
                                        textInput: oldPassword,
                                        value: oldPassword,
                                        event: {
                                            blur: trim.bind($data, password)
                                        }"
                                >
                                <p class="help-block" data-bind="validationMessage: oldPassword" style="display: none;"></p>
                            </div>
                            <div class="form-group">
                                <label for="new_password">New password</label>
                                <input
                                    type="password"
                                    class="form-control"
                                    id="resetPassword"
                                    placeholder="<PASSWORD>"
                                    name="new_password"
                                    data-bind="
                                        textInput: typedPassword,
                                        value: password,
                                        event: {
                                            blur: trim.bind($data, password)
                                        }"
                                >
                                <div class="progress create-password">
                                    <div class="progress-bar" role="progressbar" data-bind="attr: passwordComplexityBar"></div>
                                </div>
                                <p class="help-block" data-bind="validationMessage: password" style="display: none;"></p>
                                <p class="help-block" data-bind="text: passwordFeedback"></p>

                            </div>
                            <div class="form-group">
                                <label for="confirm_password">Confirm new password</label>
                                <input
                                    type="password"
                                    class="form-control"
                                    id="resetPasswordConfirmation"
                                    placeholder="<PASSWORD>"
                                    name="confirm_password"
                                    data-bind="
                                        value: passwordConfirmation,
                                        event: {
                                            blur: trim.bind($data, passwordConfirmation)
                                        }"
                                >
                                <p class="help-block" data-bind="validationMessage: passwordConfirmation" style="display: none;"></p>
                            </div>
                            <button type="submit" class="btn btn-primary" data-bind="css: {disabled: !password.isValid()}">Update password</button>
                        </form>
                    </div>
{'fraction_non_alphanumeric': 0.10695603784084586, 'fraction_numerical': 0.0027824151363383415, 'mean_word_length': 0.8276212752974678, 'pattern_counts': {'":': 0, '<': 311, '<?xml version=': 0, '>': 311, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 162, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3384927', 'n_tokens_mistral': 3665, 'n_tokens_neox': 3410, 'n_words': 721}