269 lines
11 KiB
PHP
269 lines
11 KiB
PHP
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<!--begin::Head-->
|
|
<head>
|
|
<link href="{{ asset('assets/css/pages/login/login-4.css?v=7.0.5') }}" rel="stylesheet" type="text/css" />
|
|
<x-master.head/>
|
|
|
|
</head>
|
|
<!--end::Head-->
|
|
<!--begin::Body-->
|
|
<body id="kt_body" class="quick-panel-right demo-panel-right offcanvas-right header-fixed header-mobile-fixed subheader-enabled aside-enabled aside-static page-loading" >
|
|
<!--begin::Main-->
|
|
<div class="d-flex flex-column flex-root">
|
|
<!--begin::Login-->
|
|
<div class="login login-4 wizard d-flex flex-column flex-lg-row flex-column-fluid">
|
|
<!--begin::Content-->
|
|
<div class="login-container order-2 order-lg-1 d-flex flex-center flex-row-fluid px-7 pt-lg-0 pb-lg-0 pt-4 pb-6" style="background-image: url({{asset('img/bg_login5.jpg')}});background-size: cover;">
|
|
|
|
|
|
<!--begin::Wrapper-->
|
|
<div class="login-content d-flex flex-column pt-lg-0 pt-12" >
|
|
<div style="text-align: center;margin-bottom: 70px;">
|
|
<div class="text-white" style="font-size: 32px;font-weight: 600;"> BANK</div>
|
|
<div class="text-white" style="font-size:12px;">"Webmin Electronic Data Capture Point Of Sales"</div>
|
|
</div>
|
|
<div class="login-form">
|
|
<!--begin::Form-->
|
|
<form class="form shadow" id="formDataLogin" style="
|
|
background: #ffffff;
|
|
padding: 50px 75px;
|
|
border-radius: 20px;
|
|
border: 2px solid #1b2852;
|
|
">
|
|
|
|
<!--begin::Title-->
|
|
<div class="pb-5 pb-lg-10">
|
|
{{-- <img alt="Logo" src="{{asset('img/basys.png')}}" class="logo-sticky max-h-35px" /> --}}
|
|
|
|
|
|
<h3 class="font-weight-bolder text-dark font-size-h2 font-size-h1-lg" >Sign In</h3>
|
|
<p class="font-weight-bold" style="color:#000;">Enter your username and password</p>
|
|
</div>
|
|
<!--begin::Title-->
|
|
<!--begin::Form group-->
|
|
<div class="form-group">
|
|
<label class="font-size-h6 font-weight-bolder text-dark">Username</label>
|
|
<input class="form-control form-control-solid py-7 px-6 rounded-lg border-0" type="text" name="username" autocomplete="off" />
|
|
</div>
|
|
<!--end::Form group-->
|
|
<!--begin::Form group-->
|
|
<div class="form-group zn_sh_password">
|
|
<div class="d-flex justify-content-between mt-n5">
|
|
<label class="font-size-h6 font-weight-bolder text-dark pt-5">Password</label>
|
|
</div>
|
|
<input class="form-control form-control-solid py-7 px-6 rounded-lg border-0" type="password" id="password" name="password" autocomplete="off" />
|
|
<div style="cursor: pointer;/*! float: right; */margin-top: -41px;z-index: 1111111;position: relative;left: 79%;width: 10px;" onclick="znShowPassword()">
|
|
<span class="input-group-text zn-icon-eye"><i class="la la-eye-slash"></i></span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Alert Error -->
|
|
<div class="alert alert-danger alert-dismissible d-none" id="alertError">
|
|
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
|
|
</div>
|
|
|
|
<!-- Alert Info -->
|
|
<div class="alert alert-warning alert-dismissible d-none" id="alertInfo">
|
|
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
|
|
</div>
|
|
|
|
<!-- Alert Success -->
|
|
<div class="alert alert-success alert-dismissible d-none" id="alertSuccess">
|
|
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
|
|
</div>
|
|
<!--end::Form group-->
|
|
<!--begin::Action-->
|
|
<div class="pb-lg-0 pb-5">
|
|
<button type="button" id="znBtnLoader" onclick="login();" class="btn btn-primary font-weight-bolder font-size-h6 px-8 py-4 my-3 mr-3">login</button>
|
|
{{-- <button type="submit" id="kt_login_singin_form_submit_button" class="btn btn-primary font-weight-bolder font-size-h6 px-8 py-4 my-3 mr-3">Sign In</button> --}}
|
|
|
|
</div>
|
|
|
|
{{-- <div class="font-weight-bold order-2 order-sm-1 my-2" style="color: #5e5e5e;">© 2022 Powered By : <b style="
|
|
font-weight: 700;
|
|
color: #5e5e5e;
|
|
">BASYS</b> </div> --}}
|
|
<!--end::Action-->
|
|
</form>
|
|
<!--end::Form-->
|
|
</div>
|
|
<!--end::Signin-->
|
|
<div class="d-flex flex-column-auto justify-content-between mt-15">
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<!--end::Wrapper-->
|
|
</div>
|
|
<!--begin::Content-->
|
|
|
|
</div>
|
|
<!--end::Login-->
|
|
</div>
|
|
<!--end::Main-->
|
|
<!--begin::Global Config(global config for global JS scripts)-->
|
|
<script>var KTAppSettings = { "breakpoints": { "sm": 576, "md": 768, "lg": 992, "xl": 1200, "xxl": 1200 }, "colors": { "theme": { "base": { "white": "#ffffff", "primary": "#6993FF", "secondary": "#E5EAEE", "success": "#1BC5BD", "info": "#8950FC", "warning": "#FFA800", "danger": "#F64E60", "light": "#F3F6F9", "dark": "#212121" }, "light": { "white": "#ffffff", "primary": "#E1E9FF", "secondary": "#ECF0F3", "success": "#C9F7F5", "info": "#EEE5FF", "warning": "#FFF4DE", "danger": "#FFE2E5", "light": "#F3F6F9", "dark": "#D6D6E0" }, "inverse": { "white": "#ffffff", "primary": "#ffffff", "secondary": "#212121", "success": "#ffffff", "info": "#ffffff", "warning": "#ffffff", "danger": "#ffffff", "light": "#464E5F", "dark": "#ffffff" } }, "gray": { "gray-100": "#F3F6F9", "gray-200": "#ECF0F3", "gray-300": "#E5EAEE", "gray-400": "#D6D6E0", "gray-500": "#B5B5C3", "gray-600": "#80808F", "gray-700": "#464E5F", "gray-800": "#1B283F", "gray-900": "#212121" } }, "font-family": "Poppins" };</script>
|
|
<!--end::Global Config-->
|
|
<!--begin::Global Theme Bundle(used by all pages)-->
|
|
<script src="{{ asset('assets/plugins/global/plugins.bundle.min.js?v=7.0.5') }}"></script>
|
|
<script src="{{ asset('assets/plugins/custom/prismjs/prismjs.bundle.min.js?v=7.0.5') }}"></script>
|
|
<script src="{{ asset('assets/js/scripts.bundle.min.js?v=7.0.5') }}"></script>
|
|
<script src="{{ asset('assets/validator/bootstrapValidator.min.js')}}" type="text/javascript"></script>
|
|
|
|
<script>
|
|
|
|
|
|
window.onload = () => {
|
|
const myInput = document.getElementById('password');
|
|
myInput.onpaste = e => e.preventDefault();
|
|
}
|
|
|
|
var btnLoader = KTUtil.getById("znBtnLoader");
|
|
|
|
function znShowPassword() {
|
|
if($('.zn_sh_password input').attr("type") == "text"){
|
|
$('.zn_sh_password input').attr('type', 'password');
|
|
$('.zn-icon-eye i').addClass( "la-eye-slash" );
|
|
$('.zn-icon-eye i').removeClass( "la-eye" );
|
|
}
|
|
else if($('.zn_sh_password input').attr("type") == "password"){
|
|
$('.zn_sh_password input').attr('type', 'text');
|
|
$('.zn-icon-eye i').removeClass( "la-eye-slash" );
|
|
$('.zn-icon-eye i').addClass( "la-eye" );
|
|
}
|
|
}
|
|
|
|
jQuery(document).ready(function() {
|
|
|
|
|
|
|
|
$('#formDataLogin').on('keypress', function (e) {
|
|
var keyCode = e.keyCode || e.which;
|
|
if (keyCode === 13) {
|
|
e.preventDefault();
|
|
document.getElementById("znBtnLoader").click();
|
|
}
|
|
});
|
|
|
|
$("#formDataLogin").bootstrapValidator({
|
|
excluded: [':disabled'],
|
|
fields: {
|
|
username: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: 'Tidak Boleh Kosong'
|
|
}
|
|
}
|
|
},
|
|
password: {
|
|
validators: {
|
|
notEmpty: {
|
|
message: 'Tidak Boleh Kosong'
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}).on('success.field.bv', function(e, data) {
|
|
var $parent = data.element.parents('.form-group');
|
|
$parent.removeClass('has-success');
|
|
$parent.find('.form-control-feedback[data-bv-icon-for="' + data.field + '"]').hide();
|
|
}).on('success.form.bv', function(e) {
|
|
|
|
KTUtil.btnWait(znBtnLoader, 'spinner spinner-right spinner-white pr-15', "Please wait");
|
|
|
|
});
|
|
});
|
|
|
|
|
|
function login(){
|
|
var validateLogin = $('#formDataLogin').data('bootstrapValidator').validate();
|
|
if (validateLogin.isValid()) {
|
|
|
|
|
|
var formData = document.getElementById("formDataLogin");
|
|
var objData = new FormData(formData);
|
|
|
|
$.ajaxSetup({
|
|
headers: {
|
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
|
}
|
|
});
|
|
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: '{{ route('admin.login.action') }}',
|
|
data: objData,
|
|
dataType: 'JSON',
|
|
contentType: false,
|
|
cache: false,
|
|
processData: false,
|
|
|
|
beforeSend: function () {
|
|
$("#alertInfo").addClass('d-none');
|
|
$("#alertError").addClass('d-none');
|
|
$("#alertSuccess").addClass('d-none');
|
|
$("#loading").css('display', 'block');
|
|
},
|
|
|
|
success: function (response) {
|
|
// //console.log(response);
|
|
$("#loading").css('display', 'none');
|
|
switch (response.rc) {
|
|
// password / username invalid
|
|
case 0:
|
|
KTUtil.btnRelease(btnLoader);
|
|
$("#inputUsername").val('');
|
|
$("#inputPassword").val('');
|
|
$("#alertError").removeClass('d-none');
|
|
$("#alertError").text(response.rm);
|
|
break;
|
|
|
|
// akun tidak aktif
|
|
case 1:
|
|
KTUtil.btnRelease(btnLoader);
|
|
|
|
$("#inputUsername").val('');
|
|
$("#inputPassword").val('');
|
|
$("#alertInfo").removeClass('d-none');
|
|
$("#alertInfo").text(response.rm);
|
|
break;
|
|
|
|
// reset password
|
|
case 2:
|
|
KTUtil.btnRelease(btnLoader);
|
|
|
|
$("#inputUsername").val('');
|
|
$("#inputPassword").val('');
|
|
$("#form-data")[0].reset();
|
|
$('#form-data').bootstrapValidator("resetForm", true);
|
|
$("#modal").modal('show');
|
|
$("#id").val(response.id_user);
|
|
break;
|
|
|
|
// login success
|
|
case 3:
|
|
KTUtil.btnRelease(btnLoader);
|
|
|
|
|
|
window.location.href = '{{ route('dashboard') }}';
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
}).done(function (msg) {
|
|
$("#loading").css('display', 'none');
|
|
}).fail(function (msg) {
|
|
$("#loading").css('display', 'none');
|
|
// toastr.error("Terjadi Kesalahan");
|
|
});
|
|
}
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
<!--end::Body-->
|
|
</html> |