mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 04:02:52 -06:00
Fixes #1152: Unable to edit user keys
This commit is contained in:
parent
8e333757f9
commit
3844f70a4d
@ -16,14 +16,15 @@ $(document).ready(function() {
|
||||
|
||||
// Adding/editing a secret
|
||||
$('form').submit(function(event) {
|
||||
if (
|
||||
$(this).find('input.requires-session-key').filter(function() {return this.value == ""}) &&
|
||||
document.cookie.indexOf('session_key') == -1
|
||||
) {
|
||||
$(this).find('input.requires-session-key').each(function() {
|
||||
if (this.value && document.cookie.indexOf('session_key') == -1) {
|
||||
console.log('Field ' + this.value + ' requires a session key');
|
||||
$('#privkey_modal').modal('show');
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Retrieve a session key
|
||||
$('#request_session_key').click(function() {
|
||||
|
Loading…
Reference in New Issue
Block a user