<?php $__env->startSection('css'); ?>
<link rel="stylesheet" href="<?php echo e(asset('css/bootstrap-select.min.css')); ?>">
<link href="<?php echo e(asset('css/bootstrap-datepicker.min.css')); ?>" rel="stylesheet" />
<link rel="stylesheet" href="<?php echo e(asset('css/icheck-bootstrap.min.css')); ?>">
<link rel="stylesheet" href="https://earthchie.github.io/jquery.Thailand.js/jquery.Thailand.js/dist/jquery.Thailand.min.css">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="container-fluid pt-3">
    <form action="<?php echo e(route('teacher.store')); ?>"
            novalidate class="<?php echo e(($errors->any()) ? 'was-validated' : 'needs-validation'); ?>"
            method="post"
    >
    <?php echo csrf_field(); ?>
        <div class="row">
            <div class="col-12">
                <div class="card card-outline card-success">
                    <div class="card-header">
                        <h3 class="card-title">ข้อมูลผู้สอน</h3>
                    </div>
                    <div class="card-body">
                        <div class="row">
                            <div class="col-sm-12 col-md-2">
                                <div class="form-group">
                                    <label for="title">คำนำหน้า <span class="text-red">*</span></label>
                                    <select id="title" name="title" class="selectpicker show-menu-arrow form-control" title="--เลือก--"  required>
                                      <option value="นาย">นาย</option>
                                      <option value="นาง" >นาง</option>
                                      <option value="นางสาว" >นางสาว</option>
                                    </select>
                                    <?php $__errorArgs = ['gender'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <div class="text-danger"><?php echo e($message); ?></div>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-4">
                                <div class="form-group">
                                    <label for="firstname">ชื่อ <span class="text-red">*</span></label>
                                    <input type="text" class="form-control" id="firstname" name="firstname" placeholder="ชื่อ" required>
                                    <?php $__errorArgs = ['firstname'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <div class="text-danger"><?php echo e($message); ?></div>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-4">
                                <div class="form-group">
                                    <label for="lastname">นามสกุล <span class="text-red">*</span></label>
                                    <input type="text" class="form-control" id="lastname" name="lastname" placeholder="นามสกุล" required>
                                    <?php $__errorArgs = ['lastname'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <div class="text-danger"><?php echo e($message); ?></div>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-2">
                                <div class="form-group">
                                    <label for="nickname">ชื่อเล่น</label>
                                    <input type="text" class="form-control" id="nickname" name="nickname" placeholder="ชื่อเล่น" >
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12 col-md-3">
                                <div class="form-group">
                                    <label for="idCard">เลขที่บัตรประาชาชน <span class="text-red">*</span></label>
                                    <input type="number" class="form-control" id="idCard" name="idCard" maxlength="13" placeholder="เลขที่บัตรประาชาชน" required >
                                    <?php $__errorArgs = ['idCard'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <div class="text-danger"><?php echo e($message); ?></div>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-3">
                                <div class="form-group">
                                    <label for="birthdate">วันเกิด <span class="text-red">*</span></label>
                                    <div class="input-group mb-3">
                                        <input type="text" class="form-control" id="birthdate" name="birthdate" placeholder="วันเกิด" autocomplete="off"  required>
                                        <div class="input-group-append">
                                            <span class="input-group-text"><i class="far fa-calendar-alt"></i></span>
                                        </div>
                                    </div>
                                    <?php $__errorArgs = ['birthdate'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <div class="text-danger"><?php echo e($message); ?></div>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-6">
                                <div class="form-group">
                                    <label for="address">ที่อยู่</label>
                                    <input type="text" id="address" name="address" class="form-control" placeholder="ที่อยู่">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12 col-md-4">
                                <div class="form-group">
                                    <label for="district">ตำบล / แขวง</label>
                                    <input type="text" name="district" id="district" class="form-control" placeholder="ตำบล / แขวง">
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-4">
                                <div class="form-group">
                                    <label for="amphoe">อำเภอ / เขต</label>
                                    <input type="text" name="amphoe" id="amphoe" class="form-control" placeholder="อำเภอ / เขต">
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-4">
                                <div class="form-group">
                                    <label for="province">จังหวัด</label>
                                    <input type="text" name="province" id="province" class="form-control" placeholder="จังหวัด">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12 col-md-3">
                                <div class="form-group">
                                    <label for="phone1">หมายเลขโทรศัพท์ 1 <span class="text-red">*</span></label>
                                    <input type="number" name="phone1" id="phone1" class="form-control" placeholder="หมายเลขโทรศัพท์" required>
                                    <?php $__errorArgs = ['phone1'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <div class="text-danger"><?php echo e($message); ?></div>
                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-3">
                                <div class="form-group">
                                    <label for="phone2">หมายเลขโทรศัพท์ 2</label>
                                    <input type="number" name="phone2" id="phone2" class="form-control" placeholder="หมายเลขโทรศัพท์">
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-6">
                                <div class="form-group">
                                    <label>ประเภท <span class="text-red">*</span></label>
                                    <div>
                                        <div class="icheck-nephritis icheck-inline">
                                            <input type="radio" id="all" name="teacherType" value="a" required>
                                            <label for="all">ทั้งสอนและสแกน</label>
                                        </div>
                                        <div class="icheck-nephritis icheck-inline">
                                            <input type="radio" id="teach" name="teacherType" value="t">
                                            <label for="teach">สอนอย่างเดียว</label>
                                        </div>
                                        <div class="icheck-nephritis icheck-inline">
                                            <input type="radio" id="scan" name="teacherType" value="s">
                                            <label for="scan">สแกนอย่างเดียว</label>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>  <!-- div card body -->

                </div>
                <div class="row mt-3">
                    <div class="col-12">
                        <div style="float:left">
                            <a href="<?php echo e(route('teacher.index')); ?>" class="btn btn-outline-secondary"><i class="fas fa-chevron-left"></i> ย้อนกลับ</a>
                        </div>
                        <div style="float: right">
                            <button type="reset" class="btn btn-outline-secondary" value="reset">ล้างข้อความ</button>
                            <button type="submit" class="btn btn-success ml-2" value="add-course">เพิ่มผู้สอน</button>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('footerscript'); ?>
<script src="<?php echo e(asset('js/bootstrap-select.min.js')); ?>"></script>
<script src="<?php echo e(asset('js/bootstrap-datepicker.min.js')); ?>"></script>
<script src="<?php echo e(asset('js/bootstrap-datepicker.th.min.js')); ?>"></script>
<script src="<?php echo e(asset('js/JQL.min.js')); ?>"></script>
<script src="<?php echo e(asset('js/typeahead.bundle.js')); ?>"></script>
<script src="<?php echo e(asset('js/jquery.Thailand.min.js')); ?>"></script>
<script>
    $(document).ready(function(){
        $('.selectpicker').selectpicker();

        $('#birthdate').datepicker({
            format: 'dd/mm/yyyy',
            autoclose: true,
            language: 'th',
            orientation: 'bottom',
            //thaiyear: true
        });

        $.Thailand({
            $district: $('#district'),
            $amphoe: $('#amphoe'),
            $province: $('#province'),
            $zipcode: $('#zipcode')
        });
    });
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.web', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\system.pongpetrdriving.com\resources\views/teacher/create.blade.php ENDPATH**/ ?>