mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
parent
6e3e290359
commit
e563b5bf3d
12 changed files with 108 additions and 31 deletions
|
@ -160,6 +160,7 @@
|
|||
|
||||
$('#requestToken').click(function (e) {
|
||||
e.preventDefault();
|
||||
debugger;
|
||||
var $form = $("#mainForm");
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
|
@ -167,7 +168,7 @@
|
|||
data: $form.serialize(),
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if (response.result === true) {
|
||||
if (response.apiKey) {
|
||||
generateNotify("Success!", "success");
|
||||
$('#ApiKey').val(response.apiKey);
|
||||
} else {
|
||||
|
|
|
@ -76,21 +76,22 @@
|
|||
</div>
|
||||
<br/>
|
||||
<br/>
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
|
||||
<small>Note: This will require you to setup your email notifications</small>
|
||||
@if (Model.SendRecentlyAddedEmail)
|
||||
{
|
||||
<input type="checkbox" id="SendRecentlyAddedEmail" name="SendRecentlyAddedEmail" checked="checked"><label for="SendRecentlyAddedEmail">Send out a weekly email of recently added content to all your Plex 'Friends'</label>
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="checkbox" id="SendRecentlyAddedEmail" name="SendRecentlyAddedEmail"><label for="SendRecentlyAddedEmail">Send out a weekly email of recently added content to all your Plex 'Friends'</label>
|
||||
}
|
||||
<small>Note: This will require you to setup your email notifications</small>
|
||||
@if (Model.SendRecentlyAddedEmail)
|
||||
{
|
||||
<input type="checkbox" id="SendRecentlyAddedEmail" name="SendRecentlyAddedEmail" checked="checked"><label for="SendRecentlyAddedEmail">Send out a weekly email of recently added content to all your Plex 'Friends'</label>
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="checkbox" id="SendRecentlyAddedEmail" name="SendRecentlyAddedEmail"><label for="SendRecentlyAddedEmail">Send out a weekly email of recently added content to all your Plex 'Friends'</label>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button id="recentlyAddedBtn" class="btn btn-primary-outline">Send test email to Admin</button>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
|
@ -372,5 +373,29 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#recentlyAddedBtn').click(function (e) {
|
||||
e.preventDefault();
|
||||
var base = '@Html.GetBaseUrl()';
|
||||
var url = createBaseUrl(base, '/admin/recentlyAddedTest');
|
||||
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if (response) {
|
||||
generateNotify(response.message, "success");
|
||||
} else {
|
||||
|
||||
generateNotify(response.message, "danger");
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue