mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 18:47:15 -07:00
More work on #399
This commit is contained in:
parent
ba80dfe3aa
commit
8a288db2b0
9 changed files with 195 additions and 23 deletions
|
@ -32,12 +32,23 @@
|
|||
<label class="control-label">@Model.LogLevel</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div>
|
||||
<button id="save" type="submit" class="btn btn-danger-outline">Report a bug</button>
|
||||
@if (Model.OAuthEnabled)
|
||||
{
|
||||
<div class="form-group">
|
||||
<div>
|
||||
<button id="save" type="submit" class="btn btn-danger-outline">Report a bug</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="form-group">
|
||||
<div>
|
||||
<button id="oAuth" type="submit" class="btn btn-primary-outline">Log in via Github</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
|
@ -52,16 +63,32 @@
|
|||
startBug();
|
||||
});
|
||||
|
||||
$('#oAuth').click(function () {
|
||||
var url = "/admin/oauth";
|
||||
url = createBaseUrl(baseUrl, url);
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: url,
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
window.location.href = response.uri;
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function startBug() {
|
||||
bootbox.prompt({
|
||||
size: "small",
|
||||
title: "What is the title of the issue?",
|
||||
inputType: 'textarea',
|
||||
callback: mainContent
|
||||
});
|
||||
bootbox.prompt({
|
||||
size: "small",
|
||||
title: "What is the title of the issue?",
|
||||
inputType: 'textarea',
|
||||
callback: mainContent
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function mainContent(userTitle) {
|
||||
if (!userTitle) {
|
||||
|
@ -91,7 +118,7 @@
|
|||
$.ajax({
|
||||
type: "post",
|
||||
url: url,
|
||||
data: {title : issueTitle, body : additionalInfo},
|
||||
data: { title: issueTitle, body: additionalInfo },
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if (response && response.result) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue