Skip to content

Commit

Permalink
Merge pull request #2335 from opensafely-core/always-show-sign-off-se…
Browse files Browse the repository at this point in the history
…ction

Always show the repo sign off section of the sign off page
  • Loading branch information
ghickman committed Nov 11, 2022
2 parents 37cdd56 + ed962e6 commit 09dde2c
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions jobserver/templates/sign_off_repo.html
Expand Up @@ -244,8 +244,6 @@ <h2>Project</h2>
</div>
</section>

{% if workspaces_signed_off %}

<section class="border-top pt-4 mt-4">
<div class="alert alert-danger" role="alert">
<p class="lead">
Expand All @@ -261,7 +259,19 @@ <h2>Project</h2>
</div>
</section>

<button type="button" class="btn btn-danger font-weight-bold mt-2 pt-2" data-toggle="modal" data-target="#confirmRepoVisibility">
<button
type="button"
class="btn btn-danger font-weight-bold mt-2 pt-2"
{% if not workspaces_signed_off %}
disabled
data-toggle="tooltip"
data-placement="bottom"
title="All workspaces must be signed off before a repo can be signed off"
{% else %}
data-toggle="modal"
data-target="#confirmRepoVisibility"
{% endif %}
>
Request visibility is set to public
</button>

Expand Down Expand Up @@ -306,7 +316,14 @@ <h3 class="modal-title" id="confirmRepoVisibilityLabel">Request visibility is se
</div>
</div>
</div>
{% endif %}
{% endif %}
</div>
{% endblock %}

{% block extra_js %}
<script type="text/javascript" nonce="{{ request.csp_nonce }}">
$(document).ready(function () {
$('[data-toggle="tooltip"]').tooltip()
});
</script>
{% endblock %}

0 comments on commit 09dde2c

Please sign in to comment.