
<?php $__env->startSection('title', 'Lupa Kata Sandi | ' . website_config('main')->website_name); ?>
<?php $__env->startSection('description', 'Masukkan alamat email Anda untuk menerima tautan atur ulang kata sandi akun ' . website_config('main')->website_name . '.'); ?>
<?php $__env->startSection('keywords', 'lupa kata sandi, reset password, ' . website_config('main')->meta_keywords); ?>
<?php $__env->startSection('robots', 'noindex,nofollow'); ?>
<?php $__env->startSection('breadcrumb-first', 'Lupa Kata Sandi'); ?>
<?php $__env->startSection('breadcrumb-second', website_config('main')->website_name); ?>
<?php $__env->startSection('page-title', 'Lupa Kata Sandi'); ?>
<?php $__env->startSection('content'); ?>
<div class="row">
	<div class="col-lg-6 offset-lg-3">
		<div class="card card-custom">
			<div class="card-body">
                <form method="post" action="<?php echo e(request()->url()); ?>" id="input_form">
                    <?php echo csrf_field(); ?>
                    <div class="form-group mb-3">
                        <label class="form-label">Email <text class="text-danger">*</text></label>
                        <input class="form-control" type="email" name="email" id="email" value="<?php echo e(old('email')); ?>">
                        <small id="email"></small>
                    </div>
                    <div class="button-items d-grid gap-2">
                        <button class="btn btn-custom btn btn-block waves-effect waves-light" type="submit">Atur Ulang Kata Sandi</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script>
    $("#input_form").on('submit', function(element) {
        element.preventDefault();
        $.ajax({
            url: $(this).attr('action'),
            method: $(this).attr('method'),
            data: new FormData(this),
            processData: false,
            dataType: 'json',
            contentType: false,
            beforeSend: function() {
				$('#preloader').fadeIn("slow");
                $('button:submit').attr('disabled', 'true');
                $('button:submit').text('');
                $('button:submit').append('Mohon tunggu...');
                $(document).find('input, select').removeClass('is-invalid').removeClass('is-valid');
            },
            success: function(response) {
				$('#preloader').fadeOut("slow");
                $('button:submit').removeAttr('disabled');
                $('button:submit').text('Atur Ulang Kata Sandi');
                if (response.status == false) {
                    if (response.type == 'validation') {
                        $.each(response.message, function(key, value) {
							$('input#'+key+', select#'+key+'').addClass('is-invalid');
							$('small#'+key+'').addClass('invalid-feedback').html(value[0]);
                        });
                        showAlert('danger', 'Periksa Input', 3000, 'col-lg-6 offset-lg-3');
                    } 
                    if (response.type == 'alert') {
                        showAlert(
                            response.hasOwnProperty('alert') ? response.alert : 'danger', 
                            response.message, 
                            response.hasOwnProperty('timeout') ? response.timeout : 5000, 
                            response.hasOwnProperty('size') ? response.size : 'col-lg-6 offset-lg-3'
                        );
                    }
                } else {
                    $('button:submit').attr('disabled', 'true');
                    $('button:submit').text('');
                    $('button:submit').append('Mohon tunggu...');
                    showAlert(
                        'success', 
                        response.message, 
                        1000, 
                        'col-lg-6 offset-lg-3', 
                        '<?= url('auth/login') ?>' ); } $("input, select").each(function() { if (this.classList.contains('is-invalid') == false) { this.classList.add('is-valid'); } }); }, error: function() { $('#preloader').fadeOut("slow"); $('button:submit').removeAttr('disabled'); $('button:submit').text('Atur Ulang Kata Sandi'); showAlert( 'danger', 'Terjadi kesalahan.', 5000, 'col-lg-6 offset-lg-3' ); }, }); }); </script> <?php $__env->stopSection(); ?>
<?php echo $__env->make('user.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/glor5228/public_html/resources/views/user/auth/passwords/email.blade.php ENDPATH**/ ?>