<?= $this->extend($config->viewLayout) ?>
<?= $this->section('main') ?>


<div class="row">
<div class="col-sm-4"></div>
	<div class="col-sm-4">
		<div style="margin-top:130px;"></div>
		<div class="card">
			<center>
				<h2 class="card-header"><img src="/assets/images/<?php echo FLD_APP; ?>/logo_s.png" width="80px">&nbsp;&nbsp;LOGIN</h2>
			</center>
			<div class="card-body">

				<?= view('Myth\Auth\Views\_message_block') ?>

				<form action="<?= route_to('login') ?>" method="post">
					<?= csrf_field() ?>

					<?php if ($config->validFields === ['email']) : ?>
						<div class="form-group">
							<label for="login"><?= lang('Auth.email') ?></label>
							<input type="email" class="form-control <?php if (session('errors.login')) : ?>is-invalid<?php endif ?>" name="login" placeholder="<?= lang('Auth.email') ?>">
							<div class="invalid-feedback">
								<?= session('errors.login') ?>
							</div>
						</div>
					<?php else : ?>
						<div class="form-group">
							<label for="login"><i>Masukkan Nama Pengguna</i></label>
							<input type="text" class="form-control <?php if (session('errors.login')) : ?>is-invalid<?php endif ?>" name="login" placeholder="Nama Pengguna">
							<div class="invalid-feedback">
								<?= session('errors.login') ?>
							</div>
						</div>
					<?php endif; ?>

					<div class="form-group">
						<label for="password"><i><?= lang('Auth.password') ?></i></label>
						<input type="password" name="password" class="form-control  <?php if (session('errors.password')) : ?>is-invalid<?php endif ?>" placeholder="<?= lang('Auth.password') ?>">
						<div class="invalid-feedback">
							<?= session('errors.password') ?>
						</div>
					</div>

					<?php if ($config->allowRemembering) : ?>
						<div class="form-check">
							<label class="form-check-label">
								<input type="checkbox" name="remember" class="form-check-input" <?php if (old('remember')) : ?> checked <?php endif ?>>
								<?= lang('Auth.rememberMe') ?>
							</label>
						</div>
					<?php endif; ?>

					<br>

					<button type="submit" class="btn btn-primary btn-block"><?= lang('Auth.loginAction') ?></button>
				</form>
				<br />
				<center><span class="loginft"><?php echo LOGINF; ?></span></center>
				<?php if ($config->allowRegistration) : ?>
					<p><a href="<?= route_to('register') ?>"><?= lang('Auth.needAnAccount') ?></a></p>
				<?php endif; ?>
				<?php if ($config->activeResetter) : ?>
					<p><a href="<?= route_to('forgot') ?>"><?= lang('Auth.forgotYourPassword') ?></a></p>
				<?php endif; ?>
			</div>
		</div>

	</div>
	<div class="col-sm-4"></div>


</div>


<style>
	body {
		/* The image used */
		/* Full height */
		height: 100%;

		/* Center and scale the image nicely */
		/*  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;*/

		background: url("/assets/images/<?php echo FLD_APP; ?>/login_bg.jpg") no-repeat center center fixed;
		-webkit-background-size: cover;
		-moz-background-size: cover;
		-o-background-size: cover;
		background-size: cover;



	}

	.card {
		background-color: rgba(225, 225, 225, .9);
		border-radius: 5px;
		border-style: solid;
		border-color: rgba(255,255,255,0.3);
		border-width: 5px;
	}

	.card-header {
		background-color: rgba(150, 150, 150, 1);
		color: #eee;
		margin-top: 0px;
		overflow-y: visible;
		height: 80px;
	}

	.loginft {
		font-size: 10px;
	}

	.card-body {
		padding:20px;
	}
</style>

<?= $this->endSection() ?>