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

<%def name="title()">Account Settings</%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>
                % if storage_flag_is_active:
                    <div class="panel panel-default">
                        <div class="panel-heading clearfix"><h3 class="panel-title">Default Storage Location</h3></div>
                        <div class="panel-body">
                            <form id="updateDefaultStorageLocation" role="form">
                                <div class="form-group">
                                    <select class="form-control" data-bind="options: locations, value: locationSelected(), optionsText: function(item) { return item.name }">
                                    </select>
                                    <div class="help-block">
                                        <p>
                                            This location will be applied to new projects and components. It will not affect existing projects and components.
                                        </p>
                                    </div>
                                    <input type="submit" class="btn btn-primary" data-bind="click: $root.updateDefaultStorageLocation.bind($root)" value="Update location" />
                                </div>
                                <p class="text-muted"></p>
                            </form>
                        </div>
                    </div>
                % endif
                <div id="externalIdentity" class="panel panel-default">
                    <div class="panel-heading clearfix"><h3 class="panel-title">Connected Identities</h3></div>
                    <div class="panel-body">
                        <p> Connected identities allow you to log in to the OSF via a third-party service. <br/>
                        You can revoke these authorizations here.</p>
                        <hr />
                        % if not external_identity:
                        <p >You have not authorized any external services to log in to the OSF.</p>
                        % endif
                        <tbody>
                        % for identity in external_identity:
                        <div id="externalLogin-${identity}">
                            % for id in external_identity[identity]:
                            <div><tr>
                                <td>
                                    ${identity}: ${id} (
                                    % if external_identity[identity][id] == "VERIFIED":
                                        Verified
                                    % else:
                                        Pending
                                    % endif
                                    )
                                </td>
                                <td>
                                    <a data-bind="click: $root.removeIdentity.bind($root, '${id}')"><i class="fa fa-times text-danger pull-right"></i></a>
                                </td>
                            </tr></div><commit_msg>use the knockout submit data binding instead of click<commit_after>
<%inherit file="base.mako"/>

<%def name="title()">Account Settings</%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>
                % if storage_flag_is_active:
                    <div class="panel panel-default">
                        <div class="panel-heading clearfix"><h3 class="panel-title">Default Storage Location</h3></div>
                        <div class="panel-body">
                            <form id="updateDefaultStorageLocation" data-bind="submit: $root.updateDefaultStorageLocation.bind($root)" role="form">
                                <div class="form-group">
                                    <select class="form-control" data-bind="options: locations, value: locationSelected(), optionsText: function(item) { return item.name }">
                                    </select>
                                    <div class="help-block">
                                        <p>
                                            This location will be applied to new projects and components. It will not affect existing projects and components.
                                        </p>
                                    </div>
                                </div>
                                <p class="text-muted"></p>
                                <button class="btn btn-primary" type="submit">Update location</button>
                            </form>
                        </div>
                    </div>
                % endif
                <div id="externalIdentity" class="panel panel-default">
                    <div class="panel-heading clearfix"><h3 class="panel-title">Connected Identities</h3></div>
                    <div class="panel-body">
                        <p> Connected identities allow you to log in to the OSF via a third-party service. <br/>
                        You can revoke these authorizations here.</p>
                        <hr />
                        % if not external_identity:
                        <p >You have not authorized any external services to log in to the OSF.</p>
                        % endif
                        <tbody>
                        % for identity in external_identity:
                        <div id="externalLogin-${identity}">
                            % for id in external_identity[identity]:
                            <div><tr>
                                <td>
                                    ${identity}: ${id} (
                                    % if external_identity[identity][id] == "VERIFIED":
                                        Verified
                                    % else:
                                        Pending
                                    % endif
                                    )
                                </td>
                                <td>
                                    <a data-bind="click: $root.removeIdentity.bind($root, '${id}')"><i class="fa fa-times text-danger pull-right"></i></a>
                                </td>
                            </tr></div>
{'fraction_non_alphanumeric': 0.10972552951497681, 'fraction_numerical': 0.003383882692066675, 'mean_word_length': 0.8804053257923884, 'pattern_counts': {'":': 2, '<': 320, '<?xml version=': 0, '>': 320, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 121, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '353182', 'n_tokens_mistral': 3400, 'n_tokens_neox': 3150, 'n_words': 776}