mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
Reworking the login page for #426
This commit is contained in:
parent
a82fdbc3bd
commit
f03392691c
5 changed files with 98 additions and 68 deletions
|
@ -157,15 +157,9 @@
|
|||
</div>
|
||||
<div class="col-sm-5 ">
|
||||
<div>
|
||||
{{#if_eq type "movie"}}
|
||||
<a href="https://www.themoviedb.org/movie/{{id}}/" target="_blank">
|
||||
<h4>{{title}} ({{year}})</h4>
|
||||
</a>
|
||||
{{else}}
|
||||
<a href="http://www.imdb.com/title/{{imdb}}/" target="_blank">
|
||||
<h4>{{title}} ({{year}})</h4>
|
||||
</a>
|
||||
{{/if_eq}}
|
||||
</div>
|
||||
<p>{{overview}}</p>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
@using PlexRequests.UI.Helpers
|
||||
|
||||
@using PlexRequests.UI.Helpers
|
||||
@using PlexRequests.UI.Resources
|
||||
@{
|
||||
var nullableError = Context.ViewBag.TempMessage ?? string.Empty;
|
||||
var error = false;
|
||||
if (!string.IsNullOrEmpty(nullableError))
|
||||
{
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
<div class="home">
|
||||
<h1>@UI.UserLogin_Title</h1>
|
||||
<div>
|
||||
|
@ -8,6 +17,7 @@
|
|||
</p>
|
||||
</div>
|
||||
<form method="POST" id="loginForm">
|
||||
<input id="dateTimeOffset" name="DateTimeOffset" hidden="hidden" />
|
||||
<div>
|
||||
<div>
|
||||
<label>@UI.UserLogin_Username</label>
|
||||
|
@ -24,7 +34,7 @@
|
|||
<label> @UI.UserLogin_Password </label>
|
||||
</div>
|
||||
<div>
|
||||
<input id="password" class="form-control form-control-custom" name="Password" type="password" placeholder="@UI.UserLogin_Password"/>
|
||||
<input id="password" class="form-control form-control-custom" name="Password" type="password" placeholder="@UI.UserLogin_Password" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
@ -36,15 +46,25 @@
|
|||
|
||||
<script>
|
||||
$(function () {
|
||||
var base = '@Html.GetBaseUrl()';
|
||||
$('#loginBtn').click(function (e) {
|
||||
|
||||
$('#dateTimeOffset').val(new Date().getTimezoneOffset());
|
||||
|
||||
@if (error)
|
||||
{
|
||||
<text>
|
||||
|
||||
generateNotify('@nullableError',"warning");
|
||||
|
||||
</text>
|
||||
}
|
||||
|
||||
@*$('#loginBtn').click(function (e) {
|
||||
e.preventDefault();
|
||||
var $form = $("#loginForm");
|
||||
var formData = $form.serialize();
|
||||
var dtOffset = new Date().getTimezoneOffset();
|
||||
formData += ('&DateTimeOffset=' + dtOffset);
|
||||
|
||||
var url = createBaseUrl(base, '/search');
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
url: $form.prop("action"),
|
||||
|
@ -53,9 +73,8 @@
|
|||
success: function (response) {
|
||||
console.log(response);
|
||||
if (response.result === true) {
|
||||
|
||||
location.replace(response.message);
|
||||
|
||||
|
||||
} else {
|
||||
generateNotify(response.message, "warning");
|
||||
}
|
||||
|
@ -65,6 +84,7 @@
|
|||
generateNotify("@UI.Javascript_SomethingWentWrong", "danger");
|
||||
}
|
||||
});
|
||||
});
|
||||
});*@
|
||||
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue