<table class="table table-bordered ">
    <tr>
        <th colspan="{{ len(VulnSearchResources) }}">
            Search for Vulnerabilities: <input id='searchString' name="product" type="text" size="35" value='{{ SearchStr }}'>
            <button id="groupSearchButton" class="btn btn-primary" onclick="clickAllButtons(this);"><i class="fa fa-search"></i> Search All</button>
        </th>
    </tr>
    <tr>
        {% for Name, Resource in VulnSearchResources %}
        <td>
            <button class="individualSearchButton btn btn-default btn-sm" onclick="window.open('{{ Resource }}'.replace('@@@PLACE_HOLDER@@@', getSearchString(this)))">
            <i class="fa fa-search"></i> {{ Name }}
            </button>
        </td>
        {% end %}
    </tr>
</table>
<script>
function getSearchString(elem){
    return $(elem).closest('table').find('input#searchString').val();
}
function clickAllButtons(elem){
    $(elem).closest('table').find('button.individualSearchButton').trigger('click');
}
</script>
<hr />
