mirror of https://github.com/Ombi-app/Ombi
parent
fea4dd6309
commit
152408571f
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
@ -1,174 +1,174 @@
|
|||||||
@using PlexRequests.UI.Helpers
|
@using PlexRequests.UI.Helpers
|
||||||
@Html.Partial("_Sidebar")
|
@Html.Partial("_Sidebar")
|
||||||
@{
|
@{
|
||||||
int port;
|
int port;
|
||||||
if (Model.EmailPort == 0)
|
if (Model.EmailPort == 0)
|
||||||
{
|
{
|
||||||
port = 25;
|
port = 25;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
port = Model.EmailPort;
|
port = Model.EmailPort;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<div class="col-sm-8 col-sm-push-1">
|
<div class="col-sm-8 col-sm-push-1">
|
||||||
<form class="form-horizontal" method="POST" id="mainForm">
|
<form class="form-horizontal" method="POST" id="mainForm">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Email Notifications</legend>
|
<legend>Email Notifications</legend>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
|
|
||||||
@if (Model.Enabled)
|
@if (Model.Enabled)
|
||||||
{
|
{
|
||||||
<input type="checkbox" id="Enabled" name="Enabled" checked="checked"><label for="Enabled">Enabled</label>
|
<input type="checkbox" id="Enabled" name="Enabled" checked="checked"><label for="Enabled">Enabled</label>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<input type="checkbox" id="Enabled" name="Enabled"><label for="Enabled">Enabled</label>
|
<input type="checkbox" id="Enabled" name="Enabled"><label for="Enabled">Enabled</label>
|
||||||
}
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
|
|
||||||
@if (Model.EnableUserEmailNotifications)
|
@if (Model.EnableUserEmailNotifications)
|
||||||
{
|
{
|
||||||
<input type="checkbox" id="EnableUserEmailNotifications" name="EnableUserEmailNotifications" checked="checked"><label for="EnableUserEmailNotifications">Enable user email notifications</label>
|
<input type="checkbox" id="EnableUserEmailNotifications" name="EnableUserEmailNotifications" checked="checked"><label for="EnableUserEmailNotifications">Enable user email notifications</label>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<input type="checkbox" id="EnableUserEmailNotifications" name="EnableUserEmailNotifications"><label for="EnableUserEmailNotifications">Enable user email notifications</label>
|
<input type="checkbox" id="EnableUserEmailNotifications" name="EnableUserEmailNotifications"><label for="EnableUserEmailNotifications">Enable user email notifications</label>
|
||||||
}
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<small>Please note that if user notifications is enabled, the email will get sent with the SMTP set-up below.</small>
|
<small>Please note that if user notifications is enabled, the email will get sent with the SMTP set-up below.</small>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="EmailHost" class="control-label">SMTP Host name or IP</label>
|
<label for="EmailHost" class="control-label">SMTP Host name or IP</label>
|
||||||
<div class="">
|
<div class="">
|
||||||
<input type="text" class="form-control form-control-custom " id="EmailHost" name="EmailHost" placeholder="localhost" value="@Model.EmailHost">
|
<input type="text" class="form-control form-control-custom " id="EmailHost" name="EmailHost" placeholder="localhost" value="@Model.EmailHost">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="EmailPort" class="control-label">SMTP Port</label>
|
<label for="EmailPort" class="control-label">SMTP Port</label>
|
||||||
|
|
||||||
<div class="">
|
<div class="">
|
||||||
<input type="text" class="form-control form-control-custom " id="EmailPort" name="EmailPort" placeholder="Port Number" value="@port">
|
<input type="text" class="form-control form-control-custom " id="EmailPort" name="EmailPort" placeholder="Port Number" value="@port">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="EmailSender" class="control-label">Email Sender</label>
|
<label for="EmailSender" class="control-label">Email Sender</label>
|
||||||
<div>
|
<div>
|
||||||
<input type="text" class="form-control form-control-custom " id="EmailSender" name="EmailSender" value="@Model.EmailSender">
|
<input type="text" class="form-control form-control-custom " id="EmailSender" name="EmailSender" value="@Model.EmailSender">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="RecipientEmail" class="control-label">Email Recipient</label>
|
<label for="RecipientEmail" class="control-label">Email Recipient</label>
|
||||||
<div>
|
<div>
|
||||||
<input type="text" class="form-control form-control-custom " id="RecipientEmail" name="RecipientEmail" value="@Model.RecipientEmail">
|
<input type="text" class="form-control form-control-custom " id="RecipientEmail" name="RecipientEmail" value="@Model.RecipientEmail">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="EmailUsername" class="control-label">Username</label>
|
<label for="EmailUsername" class="control-label">Username</label>
|
||||||
<div>
|
<div>
|
||||||
<input type="text" class="form-control form-control-custom " id="EmailUsername" name="EmailUsername" value="@Model.EmailUsername">
|
<input type="text" class="form-control form-control-custom " id="EmailUsername" name="EmailUsername" value="@Model.EmailUsername">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="EmailPassword" class="control-label">Password</label>
|
<label for="EmailPassword" class="control-label">Password</label>
|
||||||
<div>
|
<div>
|
||||||
<input type="password" class="form-control form-control-custom " id="EmailPassword" name="EmailPassword" value="@Model.EmailPassword">
|
<input type="password" class="form-control form-control-custom " id="EmailPassword" name="EmailPassword" value="@Model.EmailPassword">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div>
|
<div>
|
||||||
<button id="testEmail" type="submit" class="btn btn-primary-outline">Test <div id="spinner"></div></button>
|
<button id="testEmail" type="submit" class="btn btn-primary-outline">Test <div id="spinner"></div></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div>
|
<div>
|
||||||
<button id="save" type="submit" class="btn btn-primary-outline">Submit</button>
|
<button id="save" type="submit" class="btn btn-primary-outline">Submit</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|
||||||
var base = '@Html.GetBaseUrl()';
|
var base = '@Html.GetBaseUrl()';
|
||||||
$('#save').click(function (e) {
|
$('#save').click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var port = $('#EmailPort').val();
|
var port = $('#EmailPort').val();
|
||||||
if (isNaN(port)) {
|
if (isNaN(port)) {
|
||||||
generateNotify("You must specify a valid Port.", "warning");
|
generateNotify("You must specify a valid Port.", "warning");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var $form = $("#mainForm");
|
var $form = $("#mainForm");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: $form.prop("method"),
|
type: $form.prop("method"),
|
||||||
data: $form.serialize(),
|
data: $form.serialize(),
|
||||||
url: $form.prop("action"),
|
url: $form.prop("action"),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
if (response.result === true) {
|
if (response.result === true) {
|
||||||
generateNotify(response.message, "success");
|
generateNotify(response.message, "success");
|
||||||
} else {
|
} else {
|
||||||
generateNotify(response.message, "warning");
|
generateNotify(response.message, "warning");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function (e) {
|
error: function (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
generateNotify("Something went wrong!", "danger");
|
generateNotify("Something went wrong!", "danger");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#testEmail').click(function (e) {
|
$('#testEmail').click(function (e) {
|
||||||
$('#spinner').attr("class", "fa fa-spinner fa-spin");
|
$('#spinner').attr("class", "fa fa-spinner fa-spin");
|
||||||
|
|
||||||
var url = createBaseUrl(base, '/admin/testemailnotification');
|
var url = createBaseUrl(base, '/admin/testemailnotification');
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var port = $('#EmailPort').val();
|
var port = $('#EmailPort').val();
|
||||||
if (isNaN(port)) {
|
if (isNaN(port)) {
|
||||||
generateNotify("You must specify a valid Port.", "warning");
|
generateNotify("You must specify a valid Port.", "warning");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var $form = $("#mainForm");
|
var $form = $("#mainForm");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: $form.prop("method"),
|
type: $form.prop("method"),
|
||||||
data: $form.serialize(),
|
data: $form.serialize(),
|
||||||
url: url,
|
url: url,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
if (response.result === true) {
|
if (response.result === true) {
|
||||||
$('#spinner').attr("class", "fa fa-check");
|
$('#spinner').attr("class", "fa fa-check");
|
||||||
generateNotify(response.message, "success");
|
generateNotify(response.message, "success");
|
||||||
} else {
|
} else {
|
||||||
$('#spinner').attr("class", "fa fa-times");
|
$('#spinner').attr("class", "fa fa-times");
|
||||||
generateNotify(response.message, "warning");
|
generateNotify(response.message, "warning");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function (e) {
|
error: function (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
$('#spinner').attr("class", "fa fa-times");
|
$('#spinner').attr("class", "fa fa-times");
|
||||||
generateNotify("Something went wrong!", "danger");
|
generateNotify("Something went wrong!", "danger");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
Loading…
Reference in new issue