<?php $__env->startSection('content'); ?>
<script>

    function toEnglishNumber(strNum) {
   var ar = '٠١٢٣٤٥٦٧٨٩'.split('');
   var en = '0123456789'.split('');
   strNum = strNum.replace(/[٠١٢٣٤٥٦٧٨٩]/g, x => en[ar.indexOf(x)]);
   strNum = strNum.replace(/[^\d]/g, '');
   return strNum;
}

$(document).on('keyup', '.arabicNumbers', function(e) {
   var val = toEnglishNumber($(this).val())
   $(this).val(val)
});
</script>

<div class="container" dir="ltr">
    <h3 class="mb-4"> Register a New Administration  </h3>

     
                        <?php if(session()->has('success')): ?>
                        <div class="alert alert-success">
                            <span class="text-green font-bold"><?php echo e(session('success')); ?></span>
                        </div>
                       <?php endif; ?>
             
    <form action="<?php echo e(route('Administrations.store')); ?>" method="POST">
        <?php echo csrf_field(); ?>

        <div class="mb-3">
            <label class="form-label"> Department Name  </label>
           <select name="sector_id" id="">
           <option value="0" selected>---Choose One----</option>
                <?php $__currentLoopData = $sectors; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($item->id); ?>"><?php echo e($item->sectorName); ?></option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
           </select>
        </div>

        <div class="mb-3">
            <label class="form-label">  Sub-Department  </label>
            <input type="text" name="Sub_manager_name" class="form-control">
        </div>
       
        <div class="mb-3">
            <label class="form-label"> Contact Person </label>
            <input type="text" name="contact_person" class="form-control">
        </div>

        <div class="mb-3">
            <label class="form-label"> E-mail </label>
            <input type="email" name="contact_email" class="form-control">
        </div>

        <div class="mb-3">
            <label class="form-label"> Telephone </label>
            <input type="text" name="contact_Tel" class="arabicNumbers form-control">
        </div>

        <button type="submit" class="btn btn-success">save</button>
    </form>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.appuser', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/moh-portal/resources/views/Administrations/create.blade.php ENDPATH**/ ?>