<commit_before><h2>WestVault Settings</h2>

<h3>Terms of Service</h3>
<form>
    <p>
        <?php if ($_['pln_site_terms_checked']): ?>
            The terms of service were last updated <?php p($_['pln_site_terms_checked']->format('c')); ?>.
        <?php else: ?>
            The terms of service have not been updated.
        <?php endif ?>
        <br>
        <button id="pln_terms_refresh">Refresh</button>
    </p>
</form>

<h3>Global Settings</h3>
<?php if (isset($_['isAdmin']) && $_['isAdmin']): ?>
    <form id="westvault_site">
        <p>
            <label for="pln_site_ignore">Ignored file names (one per line)</label><br>
            <textarea name="pln_site_ignore" id="pln_ignore" rows="6" cols="72"><?php echo $_['pln_site_ignore']; ?></textarea><br>
            <em>Examples: .* to ignore files that start with a dot, *.log to ignore logging files.</em>
        </p>
        <h3>Checksum Type</h3>
        <p>
            <input <?php if ($_['pln_site_checksum_type'] === 'md5') echo "checked='checked'" ?> type="radio" name="pln_site_checksum_type" id="pln_site_checksum_type_md5" value="md5">
            <label for="pln_site_checksum_type_md5">MD5</label><br>
            <em>Use message digest algorithm for calculating checksums.</em>
        </p>
        <p>
            <input <?php if ($_['pln_site_checksum_type'] === 'sha1') echo "checked='checked'" ?> type="radio" name="pln_site_checksum_type" id="pln_site_checksum_type_sha1" value="sha1">
            <label for="pln_site_checksum_type_sha1">SHA-1</label><br>
            <em>Use secure hash algorithm 1 for calculating checksums.</em>
        </p>						
        <p>
            <label>Staging server endpoint</label><br>
            <input value="<?php echo $_['pln_site_url'] ?>" type="url" name="pln_site_url" id="pln_site_url" /><br>
            <em>The PLN staging server is where deposits are sent for processing. It probably
                ends in `api/sword/2.0/sd-iri`.</em>
        </p>
        <button id="site_save">Save</button>
    </form>
<?php else: ?>
    <div>
        <h4>Ignored File Names</h4>
        <p>
            Examples: .* to ignore files that start with a dot, *.log to ignore logging files.
        </p>
        <blockquote>
            <?php echo nl2br($_['pln_site_ignore']); ?>
        </blockquote>

        <h4>Checksum Type</h4>
        <p>The checksum method to use when validating deposits.</p>
        <blockquote>
            <?php if ($_['pln_site_checksum_type'] === 'md5'): ?>
                <b>MD5</b>: Use message digest algorithm for calculating checksums.
            <?php elseif ($_['pln_site_checksum_type'] === 'sha1'): ?>
                <b>SHA-1</b>: Use secure hash algorithm 1 for calculating checksums.
            <?php endif ?>
        </blockquote>

        <h4>Staging server endpoint</h4>
        <p>The PLN staging server is where deposits are sent for processing.</p>
        <blockquote>
            <?php echo $_['pln_site_url'] ?>
        </blockquote>

        <h4>Terms of Service</h4>
        <p>
            <?php if ($_['pln_site_terms_checked']): ?>
                The terms of service were last updated <?php p($_['pln_site_terms_checked']->format('c')); ?>.
            <?php else: ?>
                The terms of service have never been updated.
            <?php endif ?>
        </p>

    </div>
<?php endif ?>

<?php foreach ($_['groups'] as $group): ?>
    <h3>Settings for <?php echo $group->getGID(); ?></h3>
    <?php if (in_array($group, $_['subAdminGroups'])): ?>
        <form>
            <input type="hidden" name="group_gid" value="<?php echo $group->getGID(); ?>" />

            <p>
                <label><?php echo $group->getGID(); ?> UUID</label><br>
                <input value="<?php echo $_['pln_uuids'][$group->getGID()]; ?>" name="pln_group_uuid" id="pln_group_uuid" /><br>
                <em>Identifier for the staging server.</em>
            </p>

            <button class="group_save">Save</button>
        </form>
    <?php else: ?>
        <div>
            <h4>UUID</h4>
            <p>Identifier for the staging server.</p>
            <blockquote>
                <?php echo $_['pln_uuids'][$group->getGID()]; ?>
            </blockquote>
        </div>
    <?php endif; ?>
<?php endforeach ?>

<form id="westvault_user">
    <h3>User Settings</h3>    
    <p>
        <label for="pln_user_email">Notification address</label><br>
        <input value="<?php echo $_['pln_user_email']; ?>" type="email" name="pln_user_email" id="pln_user_email"/><br>
        <em>Notification emails will be sent to this address.</em><commit_msg>don't let people change the uuids.<commit_after><h2>WestVault Settings</h2>

<h3>Terms of Service</h3>
<form>
    <p>
        <?php if ($_['pln_site_terms_checked']): ?>
            The terms of service were last updated <?php p($_['pln_site_terms_checked']->format('c')); ?>.
        <?php else: ?>
            The terms of service have not been updated.
        <?php endif ?>
        <br>
        <button id="pln_terms_refresh">Refresh</button>
    </p>
</form>

<h3>Global Settings</h3>
<?php if (isset($_['isAdmin']) && $_['isAdmin']): ?>
    <form id="westvault_site">
        <p>
            <label for="pln_site_ignore">Ignored file names (one per line)</label><br>
            <textarea name="pln_site_ignore" id="pln_ignore" rows="6" cols="72"><?php echo $_['pln_site_ignore']; ?></textarea><br>
            <em>Examples: .* to ignore files that start with a dot, *.log to ignore logging files.</em>
        </p>
        <h3>Checksum Type</h3>
        <p>
            <input <?php if ($_['pln_site_checksum_type'] === 'md5') echo "checked='checked'" ?> type="radio" name="pln_site_checksum_type" id="pln_site_checksum_type_md5" value="md5">
            <label for="pln_site_checksum_type_md5">MD5</label><br>
            <em>Use message digest algorithm for calculating checksums.</em>
        </p>
        <p>
            <input <?php if ($_['pln_site_checksum_type'] === 'sha1') echo "checked='checked'" ?> type="radio" name="pln_site_checksum_type" id="pln_site_checksum_type_sha1" value="sha1">
            <label for="pln_site_checksum_type_sha1">SHA-1</label><br>
            <em>Use secure hash algorithm 1 for calculating checksums.</em>
        </p>						
        <p>
            <label>Staging server endpoint</label><br>
            <input value="<?php echo $_['pln_site_url'] ?>" type="url" name="pln_site_url" id="pln_site_url" /><br>
            <em>The PLN staging server is where deposits are sent for processing. It probably
                ends in `api/sword/2.0/sd-iri`.</em>
        </p>
        <button id="site_save">Save</button>
    </form>
<?php else: ?>
    <div>
        <h4>Ignored File Names</h4>
        <p>
            Examples: .* to ignore files that start with a dot, *.log to ignore logging files.
        </p>
        <blockquote>
            <?php echo nl2br($_['pln_site_ignore']); ?>
        </blockquote>

        <h4>Checksum Type</h4>
        <p>The checksum method to use when validating deposits.</p>
        <blockquote>
            <?php if ($_['pln_site_checksum_type'] === 'md5'): ?>
                <b>MD5</b>: Use message digest algorithm for calculating checksums.
            <?php elseif ($_['pln_site_checksum_type'] === 'sha1'): ?>
                <b>SHA-1</b>: Use secure hash algorithm 1 for calculating checksums.
            <?php endif ?>
        </blockquote>

        <h4>Staging server endpoint</h4>
        <p>The PLN staging server is where deposits are sent for processing.</p>
        <blockquote>
            <?php echo $_['pln_site_url'] ?>
        </blockquote>

        <h4>Terms of Service</h4>
        <p>
            <?php if ($_['pln_site_terms_checked']): ?>
                The terms of service were last updated <?php p($_['pln_site_terms_checked']->format('c')); ?>.
            <?php else: ?>
                The terms of service have never been updated.
            <?php endif ?>
        </p>

    </div>
<?php endif ?>

<?php foreach ($_['groups'] as $group): ?>
    <h3>Settings for <?php echo $group->getGID(); ?></h3>
        <div>
            <h4>UUID</h4>
            <p>Identifier for the staging server.</p>
            <blockquote>
                <?php echo $_['pln_uuids'][$group->getGID()]; ?>
            </blockquote>
        </div>
<?php endforeach ?>

<form id="westvault_user">
    <h3>User Settings</h3>    
    <p>
        <label for="pln_user_email">Notification address</label><br>
        <input value="<?php echo $_['pln_user_email']; ?>" type="email" name="pln_user_email" id="pln_user_email"/><br>
        <em>Notification emails will be sent to this address.</em>
{'fraction_non_alphanumeric': 0.16599701526805188, 'fraction_numerical': 0.010102169670531512, 'mean_word_length': 2.3991416309012874, 'pattern_counts': {'":': 0, '<': 279, '<?xml version=': 0, '>': 290, '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': '216265', 'n_tokens_mistral': 2878, 'n_tokens_neox': 2796, 'n_words': 680}