1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #1567: Prompt user for session key when importing secrets

This commit is contained in:
Jeremy Stretch
2017-10-10 13:22:40 -04:00
parent c300879995
commit 8403e91fc9
4 changed files with 9 additions and 67 deletions

View File

@@ -18,7 +18,7 @@ $(document).ready(function() {
$('form').submit(function(event) {
$(this).find('.requires-session-key').each(function() {
if (this.value && document.cookie.indexOf('session_key') == -1) {
console.log('Field ' + this.value + ' requires a session key');
console.log('Field ' + this.name + ' requires a session key');
$('#privkey_modal').modal('show');
event.preventDefault();
return false;