
<?php $__env->startSection('title', 'Daftar Akun | ' . website_config('main')->website_name); ?>
<?php $__env->startSection('description', 'Daftar akun di ' . website_config('main')->website_name . ' untuk mulai menggunakan layanan SMM Panel Indonesia dengan proses cepat, aman, dan mudah.'); ?>
<?php $__env->startSection('keywords', 'daftar akun, registrasi smm panel, buat akun smm panel, ' . website_config('main')->meta_keywords); ?>
<?php $__env->startSection('robots', 'index,follow'); ?>
<?php $__env->startSection('breadcrumb-first', 'Daftar'); ?>
<?php $__env->startSection('breadcrumb-second', website_config('main')->website_name); ?>

<?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">Nama Lengkap <text class="text-danger">*</text></label>
                        <input class="form-control" type="text" name="full_name" id="full_name" value="<?php echo e(old('full_name')); ?>">
                        <small id="full_name"></small>
                    </div>
                    <div class="form-group mb-3">
                        <label class="form-label">Nomor Telepon <text class="text-danger">*</text></label>
                        <input class="form-control" type="number" name="phone_number" id="phone_number" value="<?php echo e(old('phone_number')); ?>">
                        <small id="phone_number"></small>
                    </div>
                    <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="form-group mb-3">
                        <label class="form-label">Username <text class="text-danger">*</text></label>
                        <input class="form-control" type="text" name="username" id="username" value="<?php echo e(old('username')); ?>">
                        <small id="username"></small>
                    </div>
                    <div class="form-group mb-3">
                        <label class="form-label" for="password">Password <text class="text-danger">*</text></label>
                        <input type="password" class="form-control" name="password" id="password">
                        <small id="password"></small>
                    </div>
                    <div class="form-group mb-3">
                        <label class="form-label" for="confirm_password">Konfirmasi Password <text class="text-danger">*</text></label>
                        <input type="password" class="form-control" name="confirm_password" id="confirm_password">
                        <small id="confirm_password"></small>
                    </div>
                    <?php
                    $tos = \App\Models\WebsitePage::where('slug', 'ketentuan-layanan')->first();
                    ?>
                    <?php if($tos == true): ?>
                    <div class="form-group mb-3">
                        <div class="custom-control custom-checkbox">
                            <input type="checkbox" class="custom-control-input" name="approval" id="approval" value="1">
                            <label class="custom-control-label" for="approval">
                                Saya telah menyetujui 
                                <a href="javascript:;" class="text-custom" data-toggle="modal" data-target="#tos">
                                    <?php echo e($tos->title); ?>

                                </a>
                            </label>
                        </div>
                    </div>
                    <div class="modal fade" tabindex="-1" role="dialog" id="tos">
                        <div class="modal-dialog modal-dialog-centered modal-xl" role="document">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <h5 class="modal-title"><i class="fa fa-info-circle fa-fw"></i> Ketentuan Layanan</h5>
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                        <span aria-hidden="true">&times;</span>
                                    </button>
                                </div>
                                <div class="modal-body">
                                    <?php echo ($tos->content); ?>

                                </div>
                                <div class="modal-footer bg-whitesmoke br">
                                    <button type="button" class="btn btn-light" data-dismiss="modal">Tutup</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <?php else: ?>
                    <div class="form-group mb-3">
                        <div class="custom-control custom-checkbox">
                            <input type="checkbox" class="custom-control-input" name="approval" id="approval" value="1">
                            <label class="custom-control-label" for="approval">
                                Saya telah menyetujui <a href="javascript:;" class="text-custom">Ketentuan Layanan</a>
                            </label>
                        </div>
                    </div>
                    <?php endif; ?>
                    <div class="button-items d-grid gap-2">
                        <button class="btn btn-custom btn btn-block waves-effect waves-light" type="submit">Daftar</button>
                    </div>
                    <div class="text-center mt-3">
                    Sudah punya akun?
                    <a href="<?php echo e(url('/auth/login')); ?>">Masuk di sini</a>
                </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('Daftar');
                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('Daftar'); 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/buzb2196/public_html/panel.buzzerinaja.com/resources/views/user/auth/register.blade.php ENDPATH**/ ?>