<commit_before>@(user: securesocial.core.SocialUser)(implicit request: RequestHeader, lang: Lang)

@import securesocial.core.UsernamePasswordProvider
@import helper._

@implicitFieldConstructor = @{ FieldConstructor(auth.inputFieldConstructor.f(_)(lang)) }

@scripts = {
    <script src="@routes.Assets.at("js/account.js")"></script>
}

@exchange._chrome(Messages("chrome.exchange.navigation.account.title"), "user", scripts) {

    <div class="row">
        <div class="col-sm-6">
            <div class="panel panel-default">
                <div class="panel-heading">@Messages("exchange.account.info.title")</div>
                <div class="panel-body">
                    <p id="acct-info"></p>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="pgp-add-modal" tabindex="-1" role="dialog" aria-labelledby="pgp-add-modal" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="tfa-disable-modal">@Messages("pgp.add.title")</h4>
                </div>
                <div class="modal-body">

                    <form role="form">
                        <div class="from-group">
                            <label for="password" class="control-label">@Messages("terminology.password")</label>
                            <input class="form-control password" name="password" type="password"/>
                        </div>
                        <div class="from-group code-group">
                            <label for="code" class="control-label">@Messages("terminology.code")</label>
                            <input class="form-control code" name="code" type="text"/>
                        </div>
                        <div class="from-group">
                            <label for="pgpkey" class="control-label">@Messages("terminology.pgp_public_key")</label>
                            <textarea class="form-control pgpkey" name="pgpkey"></textarea>
                        </div>
                        <!-- this hack makes sure that the submit event is triggered when you press enter -->
                        <input type="submit" class="hidden"/>
                    </form>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">@Messages("terminology.cancel")</button>
                    <button type="button" class="btn btn-primary">@Messages("pgp.add.title")</button>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="pgp-remove-modal" tabindex="-1" role="dialog" aria-labelledby="pgp-remove-modal" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="tfa-disable-modal">@Messages("pgp.remove.title")</h4>
                </div>
                <div class="modal-body">

                    <form role="form">
                        <div class="from-group">
                            <label for="password" class="control-label">@Messages("terminology.password")</label>
                            <input class="form-control password" name="password" type="password"/>
                        </div>
                        <div class="from-group code-group">
                            <label for="code" class="control-label">@Messages("terminology.code")</label>
                            <input class="form-control code" name="code" type="text"/>
                        </div>
                        <!-- this hack makes sure that the submit event is triggered when you press enter -->
                        <input type="submit" class="hidden"/>
                    </form>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">@Messages("terminology.cancel")</button>
                    <button type="button" class="btn btn-primary">@Messages("pgp.remove.title")</button>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="tfa-enable-modal" tabindex="-1" role="dialog" aria-labelledby="tfa-enable-modal" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
            </div>
        </div>
    </div>

    <div class="modal fade" id="tfa-disable-modal" tabindex="-1" role="dialog" aria-labelledby="tfa-disable-modal" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="tfa-disable-modal">@Messages("tfa.off.title")</h4>
                </div>
                <div class="modal-body">
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">@Messages("terminology.cancel")</button>
                    <button type="button" class="btn btn-primary">@Messages("tfa.off.title")</button>
                </div>
            </div>
        </div>
    </div>


    <script id="totp-otps-template" type="text/x-handlebars-template">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title" id="tfa-enable-modal">@Messages("tfa.on.title")</h4>
        </div>
        <div class="modal-body">
            <p class="text-justify">@Messages("tfa.otps.explanation")</p>
            <div class="center-block"><ol>{{#otps}}<li>{{.}}</li>{{/otps}}</ol></div>
        <div class="modal-footer">
            <nav>
                <ul class="pager">
                    <div class="pull-left">
                        <button type="button" class="btn btn-default" data-dismiss="modal">@Messages("terminology.cancel")</button>
                    </div>
                    <li class="next"><a id="tfa-printing-complete" href="#">@Messages("tfa.codes.next") <span aria-hidden="true">&rarr;</span></a></li>
                </ul>
            </nav>
        </div>
    </script>

    <script id="totp-secret-template" type="text/x-handlebars-template">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title" id="tfa-enable-modal">@Messages("tfa.on.title")</h4>
        </div>
        <div class="modal-body">

            <p class="text-justify">@Messages("tfa.google.explanation")</p>
            <div class="center-block qr-code" id="tfa-enable-qr"></div>
            <div class="small text-center">{{secret}}</div>
            <form role="form">
                <label for="code" class="control-label">@Messages("terminology.code")</label>
                <input class="form-control code" name="code" type="text"/>
            </form>
            </div>

        <div class="modal-footer">
            <nav>
                <ul class="pager">
                    <li class="previous"><a id="tfa-printing-incomplete" href="#"><span aria-hidden="true">&larr;</span> @Messages("tfa.codes.next")</a></li>
                    <li class="pull-right">
                        <button type="button" class="btn btn-default" data-dismiss="modal">@Messages("terminology.cancel")</button><commit_msg>fix back button on 2fa dialog<commit_after>@(user: securesocial.core.SocialUser)(implicit request: RequestHeader, lang: Lang)

@import securesocial.core.UsernamePasswordProvider
@import helper._

@implicitFieldConstructor = @{ FieldConstructor(auth.inputFieldConstructor.f(_)(lang)) }

@scripts = {
    <script src="@routes.Assets.at("js/account.js")"></script>
}

@exchange._chrome(Messages("chrome.exchange.navigation.account.title"), "user", scripts) {

    <div class="row">
        <div class="col-sm-6">
            <div class="panel panel-default">
                <div class="panel-heading">@Messages("exchange.account.info.title")</div>
                <div class="panel-body">
                    <p id="acct-info"></p>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="pgp-add-modal" tabindex="-1" role="dialog" aria-labelledby="pgp-add-modal" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="tfa-disable-modal">@Messages("pgp.add.title")</h4>
                </div>
                <div class="modal-body">

                    <form role="form">
                        <div class="from-group">
                            <label for="password" class="control-label">@Messages("terminology.password")</label>
                            <input class="form-control password" name="password" type="password"/>
                        </div>
                        <div class="from-group code-group">
                            <label for="code" class="control-label">@Messages("terminology.code")</label>
                            <input class="form-control code" name="code" type="text"/>
                        </div>
                        <div class="from-group">
                            <label for="pgpkey" class="control-label">@Messages("terminology.pgp_public_key")</label>
                            <textarea class="form-control pgpkey" name="pgpkey"></textarea>
                        </div>
                        <!-- this hack makes sure that the submit event is triggered when you press enter -->
                        <input type="submit" class="hidden"/>
                    </form>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">@Messages("terminology.cancel")</button>
                    <button type="button" class="btn btn-primary">@Messages("pgp.add.title")</button>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="pgp-remove-modal" tabindex="-1" role="dialog" aria-labelledby="pgp-remove-modal" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="tfa-disable-modal">@Messages("pgp.remove.title")</h4>
                </div>
                <div class="modal-body">

                    <form role="form">
                        <div class="from-group">
                            <label for="password" class="control-label">@Messages("terminology.password")</label>
                            <input class="form-control password" name="password" type="password"/>
                        </div>
                        <div class="from-group code-group">
                            <label for="code" class="control-label">@Messages("terminology.code")</label>
                            <input class="form-control code" name="code" type="text"/>
                        </div>
                        <!-- this hack makes sure that the submit event is triggered when you press enter -->
                        <input type="submit" class="hidden"/>
                    </form>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">@Messages("terminology.cancel")</button>
                    <button type="button" class="btn btn-primary">@Messages("pgp.remove.title")</button>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="tfa-enable-modal" tabindex="-1" role="dialog" aria-labelledby="tfa-enable-modal" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
            </div>
        </div>
    </div>

    <div class="modal fade" id="tfa-disable-modal" tabindex="-1" role="dialog" aria-labelledby="tfa-disable-modal" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="tfa-disable-modal">@Messages("tfa.off.title")</h4>
                </div>
                <div class="modal-body">
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">@Messages("terminology.cancel")</button>
                    <button type="button" class="btn btn-primary">@Messages("tfa.off.title")</button>
                </div>
            </div>
        </div>
    </div>


    <script id="totp-otps-template" type="text/x-handlebars-template">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title" id="tfa-enable-modal">@Messages("tfa.on.title")</h4>
        </div>
        <div class="modal-body">
            <p class="text-justify">@Messages("tfa.otps.explanation")</p>
            <div class="center-block"><ol>{{#otps}}<li>{{.}}</li>{{/otps}}</ol></div>
        <div class="modal-footer">
            <nav>
                <ul class="pager">
                    <div class="pull-left">
                        <button type="button" class="btn btn-default" data-dismiss="modal">@Messages("terminology.cancel")</button>
                    </div>
                    <li class="next"><a id="tfa-printing-complete" href="#">@Messages("tfa.codes.next") <span aria-hidden="true">&rarr;</span></a></li>
                </ul>
            </nav>
        </div>
    </script>

    <script id="totp-secret-template" type="text/x-handlebars-template">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title" id="tfa-enable-modal">@Messages("tfa.on.title")</h4>
        </div>
        <div class="modal-body">

            <p class="text-justify">@Messages("tfa.google.explanation")</p>
            <div class="center-block qr-code" id="tfa-enable-qr"></div>
            <div class="small text-center">{{secret}}</div>
            <form role="form">
                <label for="code" class="control-label">@Messages("terminology.code")</label>
                <input class="form-control code" name="code" type="text"/>
            </form>
            </div>

        <div class="modal-footer">
            <nav>
                <ul class="pager">
                    <li class="previous"><a id="tfa-printing-incomplete" href="#"><span aria-hidden="true">&larr;</span> @Messages("tfa.codes.prev")</a></li>
                    <li class="pull-right">
                        <button type="button" class="btn btn-default" data-dismiss="modal">@Messages("terminology.cancel")</button>
{'fraction_non_alphanumeric': 0.17181956411556007, 'fraction_numerical': 0.0019640141915864165, 'mean_word_length': 1.9027215888194189, 'pattern_counts': {'":': 0, '<': 361, '<?xml version=': 0, '>': 361, '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': '7477637', 'n_tokens_mistral': 4459, 'n_tokens_neox': 4243, 'n_words': 738}