mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Fixed #162
This commit is contained in:
parent
84edd6636d
commit
ffbb3d9a44
1 changed files with 31 additions and 25 deletions
|
@ -130,34 +130,40 @@
|
|||
|
||||
@if (!string.IsNullOrEmpty(Model.QualityProfile))
|
||||
{
|
||||
<text>
|
||||
var qualitySelected = @Model.QualityProfile;
|
||||
if (!qualitySelected) {
|
||||
return;
|
||||
}
|
||||
var $form = $("#mainForm");
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
data: $form.serialize(),
|
||||
url: "sonarrprofiles",
|
||||
dataType: "json",
|
||||
success: function(response) {
|
||||
response.forEach(function(result) {
|
||||
if (result.id == qualitySelected) {
|
||||
|
||||
$("#select").append("<option selected='selected' value='" + result.id + "'>" + result.name + "</option>");
|
||||
} else {
|
||||
$("#select").append("<option value='" + result.id + "'>" + result.name + "</option>");
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
<text>
|
||||
|
||||
preLoad();
|
||||
|
||||
function preLoad() {
|
||||
var qualitySelected = @Model.QualityProfile;
|
||||
if (!qualitySelected) {
|
||||
return;
|
||||
}
|
||||
});
|
||||
var $form = $("#mainForm");
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
data: $form.serialize(),
|
||||
url: "sonarrprofiles",
|
||||
dataType: "json",
|
||||
success: function(response) {
|
||||
response.forEach(function(result) {
|
||||
if (result.id == qualitySelected) {
|
||||
|
||||
$("#select").append("<option selected='selected' value='" + result.id + "'>" + result.name + "</option>");
|
||||
} else {
|
||||
$("#select").append("<option value='" + result.id + "'>" + result.name + "</option>");
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
}
|
||||
</text>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$('#save').click(function(e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue