mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Fixed #1066
This commit is contained in:
parent
5aea0c0828
commit
5271b289a3
1 changed files with 0 additions and 45 deletions
|
@ -87,16 +87,7 @@
|
|||
|
||||
|
||||
changeDisabledStatus($('#UsePassword'), @Model.UserAuthentication.ToString().ToLower(), $('#passLabel'));
|
||||
if ($('#PlexAuthToken')) {
|
||||
loadUserList();
|
||||
}
|
||||
|
||||
$('#refreshUsers').click(function (e) {
|
||||
e.preventDefault();
|
||||
loadUserList();
|
||||
});
|
||||
|
||||
|
||||
$('#mainForm').on('click', '#userAuth', function () {
|
||||
var checked = this.checked;
|
||||
changeDisabledStatus($('#UsePassword'), checked, $('#passLabel'));
|
||||
|
@ -112,41 +103,5 @@
|
|||
$label.css("color", "grey");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function loadUserList() {
|
||||
$('#users').html("");
|
||||
var url = "getusers";
|
||||
$.ajax({
|
||||
type: "Get",
|
||||
url: url,
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
|
||||
$('#users').html("");
|
||||
if(!response.result){
|
||||
generateNotify(response.message,"danger");
|
||||
$('#users').append("<option>Error!</option>");
|
||||
return;
|
||||
}
|
||||
if (response.users.length > 0) {
|
||||
$(response.users).each(function () {
|
||||
$('#users').append("<option>" + this + "</option>");
|
||||
});
|
||||
} else {
|
||||
$('#users').append("<option>No Users, Please refresh!</option>");
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
$('#users').html("");
|
||||
$('#users').append("<option>Error!</option>");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue