Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always show the repo sign off section of the sign off page #2335

Merged
merged 1 commit into from Nov 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 %}