{% macro institute_settings(form, beacon_form, institute, current_user, loqus_instances) %}
{{ form.csrf_token }}
General Institute Settings
{{ form.display_name.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Name of the institute which will be displayed on Scout pages.") }} {{ form.display_name(class='form-control', value=institute.display_name) }} {% for error in form.display_name.errors %} {{ error }}
{% endfor %}
{{form.sanger_emails.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Email addresses to send variant verification email to. Only accepts current Scout user emails: exceptions to this can be made by a db admin. Please ask for support!")}} {% for error in form.sanger_emails.errors %} {{ error }}
{% endfor %}
{{ form.coverage_cutoff.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Read depth considered reliable for displaying variants. Used in coverage reports.") }} {{ form.coverage_cutoff(class='form-control', value=institute.coverage_cutoff) }} {% for error in form.coverage_cutoff.errors %} {{ error }}
{% endfor %}
{{ form.frequency_cutoff.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Lower frequency threshold to display variants. NOTE: used as the institute's default in clinical filter.") }} {{ form.frequency_cutoff(class='form-control', value=institute.frequency_cutoff) }} {% for error in form.frequency_cutoff.errors %} {{ error }}
{% endfor %}
{{ form.pheno_group.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Add a new phenotype group item to the list of phenotype shortcuts below.") }}
{{ form.pheno_abbrev.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="A short name for this phenotype group.") }}
{{ form.gene_panels.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Select gene panels that will be available for variants filtering.") }}
{{ form.pheno_groups.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Phenotype groups are used to quickly assign a certain phenotype to a case, on the case page.") }}
{{form.cohorts.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Categories used to subdivide patients")}}
{{ form.institutes.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Allow case sharing only with preselected institutes.") }}
{% if "admin" in current_user.roles %}
{{ form.loqusdb_id.label(class="control-label", data_bs_toggle="tooltip", data_bs_placement="top", title="LoqudDB id" ) }}
{{ form.alamut_key.label(class="control-label",data_bs_toggle="tooltip", data_bs_placement="top", title="Optional Alamut Visual Plus API key to be used when opening links to Alamut") }} ? {{ form.alamut_key(class='form-control', value=institute.alamut_key if institute.alamut_key) }}
{% endif %}

{{ form.submit_btn(class="btn-primary btn") }}
{% if current_user.is_admin and config.BEACON_URL and config.BEACON_TOKEN %}
The following institute-level datasets are missing and could be created in Beacon:
{{beacon_form.beacon_dataset(class="selectpicker btn-secondary")}}
{{beacon_form.beacon_submit_btn(class="btn-secondary btn")}}
{% endif %}
{% endmacro %} {% macro users_table(users) %} {% for user in users %} {% endfor %}
# Name E-mail Roles Last connected
{{loop.index}} {{user.name}} {{user.email}} {{user.roles|join(', ')}} {{user.accessed_at or "-"}}
{% endmacro %}