Skip to content

Commit bd04f62

Browse files
Enable/disable "Copy SSO URL" button based on CAS login URL availability
1 parent 929ed77 commit bd04f62

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

admin/templates/institutions/detail.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,18 @@
6060
{% if perms.osf.change_institution %}
6161
<a class="btn btn-primary" href={% url 'institutions:list_and_add_admin' institution.id %}>Manage Admins</a>
6262
{% endif %}
63-
{% if cas_login_url %}
64-
<button class="btn btn-primary" onclick="openCopyPopup('{{ cas_login_url|escapejs }}')">
65-
Copy SSO URL
66-
</button>
67-
<div id="copy-modal" class="modal">
68-
<div class="modal-content">
69-
<span class="close" onclick="closeCopyPopup()">&times;</span>
70-
<p>Value copied. You can also copy manually:</p>
71-
<textarea id="copy-input" readonly></textarea>
72-
</div>
63+
<button
64+
{% if not cas_login_url %}disabled{% endif %}
65+
class="btn btn-primary" onclick="openCopyPopup('{{ cas_login_url|escapejs }}')">
66+
Copy SSO URL
67+
</button>
68+
<div id="copy-modal" class="modal">
69+
<div class="modal-content">
70+
<span class="close" onclick="closeCopyPopup()">&times;</span>
71+
<p>Value copied. You can also copy manually:</p>
72+
<textarea id="copy-input" readonly></textarea>
7373
</div>
74-
{% endif %}
74+
</div>
7575
</div>
7676
</div>
7777

0 commit comments

Comments
 (0)