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,13 +16,14 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
// Adding/editing a secret
|
// Adding/editing a secret
|
||||||
$('form').submit(function(event) {
|
$('form').submit(function(event) {
|
||||||
if (
|
$(this).find('input.requires-session-key').each(function() {
|
||||||
$(this).find('input.requires-session-key').filter(function() {return this.value == ""}) &&
|
if (this.value && document.cookie.indexOf('session_key') == -1) {
|
||||||
document.cookie.indexOf('session_key') == -1
|
console.log('Field ' + this.value + ' requires a session key');
|
||||||
) {
|
$('#privkey_modal').modal('show');
|
||||||
$('#privkey_modal').modal('show');
|
event.preventDefault();
|
||||||
event.preventDefault();
|
return false;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Retrieve a session key
|
// Retrieve a session key
|
||||||
|
Loading…
Reference in New Issue
Block a user