mirror of https://github.com/Ombi-app/Ombi
Finished adding pushover support. #44
parent
f64ccd7327
commit
2d5612a045
@ -0,0 +1,74 @@
|
||||
@Html.Partial("_Sidebar")
|
||||
|
||||
<div class="col-sm-8 col-sm-push-1">
|
||||
<form class="form-horizontal" method="POST" id="mainForm">
|
||||
<fieldset>
|
||||
<legend>Pushover Notifications</legend>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
@if (Model.Enabled)
|
||||
{
|
||||
<input type="checkbox" id="Enabled" name="Enabled" checked="checked"><text>Enabled</text>
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="checkbox" id="Enabled" name="Enabled"><text>Enabled</text>
|
||||
}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="AccessToken" class="control-label">API Key</label>
|
||||
<small class="control-label">Enter your API Key from Pushover.</small>
|
||||
<div class="">
|
||||
<input type="text" class="form-control form-control-custom " id="AccessToken" name="AccessToken" value="@Model.AccessToken">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="UserToken" class="control-label">User Token</label>
|
||||
<small class="control-label">Your user or group key from Pushover.</small>
|
||||
<div class="">
|
||||
<input type="text" class="form-control form-control-custom " id="UserToken" name="UserToken" value="@Model.UserToken">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div>
|
||||
<button id="save" type="submit" class="btn btn-primary-outline">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#save').click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var $form = $("#mainForm");
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
data: $form.serialize(),
|
||||
url: $form.prop("action"),
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if (response.result === true) {
|
||||
generateNotify(response.message, "success");
|
||||
} else {
|
||||
generateNotify(response.message, "warning");
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Reference in new issue