<commit_before><%inherit file="project/project_base.mako"/>

<%def name="title()">Register ${node['title']}</%def>

<div id="draftRegistrationScope">
    <div class="row">
        <div class="col-md-12">
            <h3>Register</h3>
        </div>
    </div>
    <hr>
    <div class="row">
      <div class="col-lg-12 large-12" style="padding-left: 30px">
         <div data-bind="foreach: {data: draft.pages, as: 'page'}">
           <h3 data-bind="attr.id: page.id, text: page.title"></h3>
             <div data-bind="foreach: {data: page.questions, as: 'question'}">
               <p>
                 <strong data-bind="attr.id: question.id, text: question.title"></strong>:
                 <span data-bind="previewQuestion: $root.editor.context(question, $root.editor)"></span>
               </p>
             </div>
            </div>
        </div>
    </div>
    <div class="row-md-12 scripted">
        <a type="button" class="btn btn-default pull-left" href="${draft['urls']['edit']}">Continue editing</a>
        <button id="register-submit" type="button" class="btn btn-success pull-right"
                style="margin-left: 5px;"
                data-bind="visible: draft.requiresApproval,
                           click: draft.submitForReview,
                           enable: editor.canSubmit">
          Submit for review
        </button>

        <!-- TODO(samchrisinger): Enable when post-registration file path updating is in
        <span data-bind="if: draft.metaSchema.name === 'Prereg Challenge'">
          <button id="register-submit" type="button" class="btn btn-primary pull-right" data-toggle="tooltip" data-placement="top" title="Not eligible for the Pre-Registration Challenge" data-bind="click: draft.registerWithoutReview">Register without review</button>
        </span>
        -->

        <button id="register-submit" type="button" class="btn btn-success pull-right"
                style="margin-left: 5px;"
                data-bind="visible: !draft.requiresApproval(), click: draft.beforeRegister.bind(draft, null)">
          Register
        </button>
    </div>
</div>

<%include file="project/registration_utils.mako" />
<%include file="project/registration_editor_extensions.mako" /><commit_msg>Hide Submit for Review and Continue Editing if draft is pending approval<commit_after><%inherit file="project/project_base.mako"/>

<%def name="title()">Register ${node['title']}</%def>

<div id="draftRegistrationScope">
    <div class="row">
        <div class="col-md-12">
            <h3>Register</h3>
        </div>
    </div>
    <hr>
    <div class="row">
      <div class="col-lg-12 large-12" style="padding-left: 30px">
         <div data-bind="foreach: {data: draft.pages, as: 'page'}">
           <h3 data-bind="attr.id: page.id, text: page.title"></h3>
             <div data-bind="foreach: {data: page.questions, as: 'question'}">
               <p>
                 <strong data-bind="attr.id: question.id, text: question.title"></strong>:
                 <span data-bind="previewQuestion: $root.editor.context(question, $root.editor)"></span>
               </p>
             </div>
            </div>
        </div>
    </div>
    <div class="row-md-12 scripted">
        <span data-bind="ifnot: draft.isPendingApproval">
          <a type="button" class="btn btn-default pull-left" href="${draft['urls']['edit']}">Continue editing</a>
        </span>

        <span data-bind="ifnot: draft.isPendingApproval">
          <button id="register-submit" type="button" class="btn btn-success pull-right"
                  style="margin-left: 5px;"
                  data-bind="visible: draft.requiresApproval,
                             click: draft.submitForReview,
                             enable: editor.canSubmit">
            Submit for review
          </button>
        </span>

        <!-- TODO(samchrisinger): Enable when post-registration file path updating is in
        <span data-bind="if: draft.metaSchema.name === 'Prereg Challenge'">
          <button id="register-submit" type="button" class="btn btn-primary pull-right" data-toggle="tooltip" data-placement="top" title="Not eligible for the Pre-Registration Challenge" data-bind="click: draft.registerWithoutReview">Register without review</button>
        </span>
        -->

        <button id="register-submit" type="button" class="btn btn-success pull-right"
                style="margin-left: 5px;"
                data-bind="visible: !draft.requiresApproval(), click: draft.beforeRegister.bind(draft, null)">
          Register
        </button>
    </div>
</div>

<%include file="project/registration_utils.mako" />
<%include file="project/registration_editor_extensions.mako" />
{'fraction_non_alphanumeric': 0.16130397967823878, 'fraction_numerical': 0.006773920406435224, 'mean_word_length': 2.4717119764878768, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 93, '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': '6638003', 'n_tokens_mistral': 1390, 'n_tokens_neox': 1334, 'n_words': 291}