<commit_before><%inherit file="base.mako"/>
<%def name="title()">Register Component</%def>
<%def name="content()">
<div mod-meta='{"tpl": "project/project_header.mako", "replace": true}'></div>

<div mod-meta='{
        "tpl": "metadata/knockout.mako",
        "replace": true
    }'></div>

<legend>Register</legend>

% if schema:

    <div id="registration_template" data-bind="with:currentPage">

        <h2 data-bind="text:$data.title"></h2>
        <br />

        <form class="form">

            <div data-bind="foreach:questions">
                <div class="form-group">
                    <label class="control-label" data-bind="text:$data.label, attr:{for:$data.id}"></label>
                    <div class="controls">
                        <div data-bind='item:$data, attr:{id:$data.id}'></div>
                    </div>
                </div>
            </div>

            <!-- Pagination -->
            <div data-bind="visible:$parent.npages > 1">
                <div class="form-group">
                    <div class="controls">
                        <button class="btn" data-bind="click:$parent.previous, disable:$parent.isFirst()">Previous</button>
                        <span class="progress-meter" style="padding: 0px 10px 0px 10px;">
                            Page <span data-bind="text:$parent.currentIndex() + 1"></span>
                            of <span data-bind="text:$parent.npages"></span>
                        </span>
                        <button class="btn" data-bind="click:$parent.next, disable:$parent.isLast()">Next</button>
                    </div>
                </div>
            </div>

            % if not registered:

                <div id="register-show-submit" data-bind="visible:$parent.isLast()">

                    <hr />

                    <p class="help-block">
                        Registration cannot be undone, and the archived content and
                        files cannot be deleted after registration. Please be sure the
                        project is complete and comprehensive for what you wish to
                        register.
                    </p>

                    <div class="form-group">
                        <label>
                            Type "continue" if you are sure you want to continue
                        </label>
                        <div class="controls">
                            <input class="form-control" data-bind="value:$parent.continueText, valueUpdate: 'afterkeydown'" />
                        </div>
                    </div>

                    <button id="register-submit" class="btn btn-success" data-bind="visible:$parent.continueFlag">
                        Register
                    </button>

                </div>

            % endif

        </form>

    </div>

    <!-- Apply view model --><commit_msg>Fix submission on pressing enter<commit_after><%inherit file="base.mako"/>
<%def name="title()">Register Component</%def>
<%def name="content()">
<div mod-meta='{"tpl": "project/project_header.mako", "replace": true}'></div>

<div mod-meta='{
        "tpl": "metadata/knockout.mako",
        "replace": true
    }'></div>

<legend>Register</legend>

% if schema:

    <div id="registration_template" data-bind="with:currentPage">

        <h2 data-bind="text:$data.title"></h2>
        <br />

        <form class="form">

            <div data-bind="foreach:questions">
                <div class="form-group">
                    <label class="control-label" data-bind="text:$data.label, attr:{for:$data.id}"></label>
                    <div class="controls">
                        <div data-bind='item:$data, attr:{id:$data.id}'></div>
                    </div>
                </div>
            </div>

            <!-- Pagination -->
            <div data-bind="visible:$parent.npages > 1">
                <div class="form-group">
                    <div class="controls">
                        <button class="btn" data-bind="click:$parent.previous, disable:$parent.isFirst()">Previous</button>
                        <span class="progress-meter" style="padding: 0px 10px 0px 10px;">
                            Page <span data-bind="text:$parent.currentIndex() + 1"></span>
                            of <span data-bind="text:$parent.npages"></span>
                        </span>
                        <button class="btn" data-bind="click:$parent.next, disable:$parent.isLast()">Next</button>
                    </div>
                </div>
            </div>

            % if not registered:

                <div id="register-show-submit" data-bind="visible:$parent.isLast()">

                    <hr />

                    <p class="help-block">
                        Registration cannot be undone, and the archived content and
                        files cannot be deleted after registration. Please be sure the
                        project is complete and comprehensive for what you wish to
                        register.
                    </p>

                    <div class="form-group">
                        <label>
                            Type "continue" if you are sure you want to continue
                        </label>
                        <div class="controls">
                            <input class="form-control" data-bind="value:$parent.continueText, valueUpdate: 'afterkeydown'" />
                        </div>
                    </div>

                    <button id="register-submit" class="btn btn-success" data-bind="visible:$parent.continueFlag, focus:$parent.continueFlag">
                        Register
                    </button>

                </div>

            % endif

        </form>

    </div>

    <!-- Apply view model -->
{'fraction_non_alphanumeric': 0.14278323848939473, 'fraction_numerical': 0.003448870494912916, 'mean_word_length': 1.401656314699793, 'pattern_counts': {'":': 8, '<': 121, '<?xml version=': 0, '>': 123, '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': '2752006', 'n_tokens_mistral': 1563, 'n_tokens_neox': 1387, 'n_words': 323}