<commit_before><div class="search row well">
    <p>Search and filter available units. Stats are listed for the highest rarity of the unit.</p>
    <?php
    $rarities = \Cake\Core\Configure::read('rarities');

    echo $this->Form->create(null, ['id' => 'unitsearchform']);

    ?><div class='col-md-6'><?php
        echo $this->Form->input('name');
        echo $this->Form->input('game', ['type' => 'select', 'options' => $origins, 'empty' => 'Select origin game']);
        echo $this->Form->input('job', ['empty' => 'Select unit job']);
        ?></div>
    <div class="col-md-6"><?php
        echo $this->Form->input('role', ['type' => 'select', 'options' => $specialisations, 'empty' => 'Select role']);
        echo $this->Form->input('min_rarity', ['type' => 'select', 'options' => $rarities, 'empty' => 'Select lowest rarity']);
        echo $this->Form->input('max_rarity', ['type' => 'select', 'options' => $rarities, 'empty' => 'Select highest rarity']);
        ?></div>
    <?php
    echo $this->Form->submit('Search', ['class' => 'btn btn-success']);
    echo $this->Form->end();
    echo $this->Html->link('Reset', ['action' => 'index'], ['class' => 'btn btn-default']);
    ?>
</div><commit_msg>Preserve any existing get params when searching<commit_after><div class="search row well">
    <p>Search and filter available units. Stats are listed for the highest rarity of the unit.</p>
    <?php
    $rarities = \Cake\Core\Configure::read('rarities');

    $url = ['action' => 'index'];
    if ($this->request->query('type')) {
        $url = array_merge($url, ['type' => $this->request->query('type')]);
    }

    echo $this->Form->create(null, ['id' => 'unitsearchform', 'url' => $url]);

    ?><div class='col-md-6'><?php
        echo $this->Form->input('name');
        echo $this->Form->input('game', ['type' => 'select', 'options' => $origins, 'empty' => 'Select origin game']);
        echo $this->Form->input('job', ['empty' => 'Select unit job']);
        ?></div>
    <div class="col-md-6"><?php
        echo $this->Form->input('role', ['type' => 'select', 'options' => $specialisations, 'empty' => 'Select role']);
        echo $this->Form->input('min_rarity', ['type' => 'select', 'options' => $rarities, 'empty' => 'Select lowest rarity']);
        echo $this->Form->input('max_rarity', ['type' => 'select', 'options' => $rarities, 'empty' => 'Select highest rarity']);
        ?></div>
    <?php
    echo $this->Form->submit('Search', ['class' => 'btn btn-success']);
    echo $this->Form->end();
    echo $this->Html->link('Reset', ['action' => 'index'], ['class' => 'btn btn-default']);
    ?>
</div>
{'fraction_non_alphanumeric': 0.24525436598329536, 'fraction_numerical': 0.0015186028853454822, 'mean_word_length': 3.6554770318021204, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 108, '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': '232268', 'n_tokens_mistral': 834, 'n_tokens_neox': 832, 'n_words': 206}