|
|
@ -1,4 +1,7 @@
|
|
|
|
@using PlexRequests.UI.Helpers
|
|
|
|
@using System.Linq
|
|
|
|
|
|
|
|
@using PlexRequests.Core.Models
|
|
|
|
|
|
|
|
@using PlexRequests.UI.Helpers
|
|
|
|
|
|
|
|
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<PlexRequests.Core.SettingModels.EmailNotificationSettings>
|
|
|
|
@Html.Partial("_Sidebar")
|
|
|
|
@Html.Partial("_Sidebar")
|
|
|
|
@{
|
|
|
|
@{
|
|
|
|
int port;
|
|
|
|
int port;
|
|
|
@ -19,28 +22,28 @@
|
|
|
|
<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>
|
|
|
@ -90,6 +93,38 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--Accordion Item-->
|
|
|
|
|
|
|
|
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
|
|
|
|
|
|
|
|
@for (var i = 0; i < Model.Message.Count; i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
|
|
|
|
<div class="panel-heading" role="tab" id="@(i)headingOne">
|
|
|
|
|
|
|
|
<h4 class="panel-title">
|
|
|
|
|
|
|
|
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#@(i)collapseOne" aria-controls="@(i)collapseOne">
|
|
|
|
|
|
|
|
@Model.Message[i].NotificationType.ToString()
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</h4>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="@(i)collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="@(i)headingOne">
|
|
|
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
|
|
<label for="@(Model.Message[i])" class="control-label"> @Model.Message[i].NotificationType.ToString() Subject</label>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<input type="text" class="form-control form-control-custom " id="@(Model.Message[i].Subject)" name="Message[@(i)].Subject" value="@(Model.Message[i].Subject)">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
|
|
<label for="@(Model.Message[i].Body)" class="control-label">@Model.Message[i].NotificationType.ToString() Body</label>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<input type="text" class="form-control form-control-custom " id="@(Model.Message[i].Body)" name="Message[@(i)].Body" value="@(Model.Message[i].Body)">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</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>
|
|
|
@ -102,6 +137,7 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
@ -116,10 +152,13 @@
|
|
|
|
generateNotify("You must specify a valid Port.", "warning");
|
|
|
|
generateNotify("You must specify a valid Port.", "warning");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var $form = $("#mainForm");
|
|
|
|
var $form = $("#mainForm");
|
|
|
|
|
|
|
|
var data = $form.serialize();
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
type: $form.prop("method"),
|
|
|
|
type: $form.prop("method"),
|
|
|
|
data: $form.serialize(),
|
|
|
|
data: data,
|
|
|
|
url: $form.prop("action"),
|
|
|
|
url: $form.prop("action"),
|
|
|
|
dataType: "json",
|
|
|
|
dataType: "json",
|
|
|
|
success: function (response) {
|
|
|
|
success: function (response) {
|
|
|
|