| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- @using VberZero.BaseSystem.Users
- @model VberAdmin.Web.Models.Account.LoginFormViewModel
- @{
- ViewBag.Title = "登录";
- }
- <h1 class="text-center mb-8">@L("LogIn")</h1>
- <form id="LoginForm" asp-action="Login" method="post">
- <input type="hidden" name="returnUrl" value="@Model.ReturnUrl" />
- <input type="hidden" name="returnUrlHash" />
- <div class="mb-5 fadeIn fadeIn-1">
- <input type="text" name="usernameOrEmailOrPhone" class="form-control" placeholder="@L("UserNameOrEmail")" required autofocus maxlength="@VberZero.BaseSystem.Users.User.MaxEmailAddressLength">
- </div>
- <div class="mb-5 fadeIn fadeIn-2">
- <input type="password" class="form-control" name="Password" autocomplete="password" placeholder="@L("Password")" required maxlength="@VberZero.BaseSystem.Users.User.MaxPlainPasswordLength">
- </div>
- <div class="d-flex fadeIn fadeIn-4 justify-content-between">
- <label class="form-check form-check-custom form-check-solid form-check-sm me-5">
- <input class="form-check-input" name="RememberMe" type="checkbox" value="true"/>
- <span class="form-check-label text-primary fs-8">
- @L("RememberMe")
- </span>
- </label>
- <div>
- @if (Model.IsSelfRegistrationAllowed)
- {
- <a asp-action="Register" class="text-center pe-5"><span class="fas fa-plus-circle"></span> @L("Register")</a>
- }
- <button type="submit" id="LoginButton" calss="btn btn-primary btn-block">@L("LogIn")</button>
- </div>
-
- </div>
-
- </form>
- @section scripts{
- <script>
- (function () {
- $('#ReturnUrlHash').val(location.hash);
- var _$form = $('#LoginForm');
- _$form.submit(function (e) {
- e.preventDefault();
- if (!_$form.valid()) {
- return;
- }
- abp.ui.setBusy($('body'), {
- message:"正在登录,请稍后...",
- css: {
- backgroundColor: 'rgba(0,0,0,0)',
- border:"none",
- color: '#fff',
- fontSize:"18px"
- }
- });
- abp.ajax({
- contentType: 'application/x-www-form-urlencoded',
- url: _$form.attr('action'),
- data: _$form.serialize()
- })
-
- });
- })();
- </script>
- }
|