
<?php $__env->startSection('main-container'); ?>
<main id="main" class="main">
<?php echo $__env->make('cdn', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<div class="content-wrapper">
        <div class="row ">
          <div class="card">
            <div class="card-body">

              <div class="row">
                <div class="col-md-6">
                  <div class="form-group row ">
                    <h4 class="card-title">LEAD INFORMATION</h4>
                  </div>
                </div>
              </div>
              <form action="<?php echo e(url('/savenewlead')); ?>" method="POST" class="form-sample">
               <?php echo e(csrf_field()); ?>

                <div class="row">
                  <div class="col-md-6">
                    <div class="form-group row">
                      <label class="col-sm-4 col-form-label">Name<span style="color:red;">*</span></label>
                      <div class="col-sm-8">
                          <input type="text" name="name" class="form-control" placeholder="Enter Name" required/>
                          <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                          <div class="alert alert-danger mt-1 mb-1"><?php echo e($message); ?></div>
                          <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                      </div>
                    </div>
                  </div>
                   <div class="col-md-6">
                    <div class="form-group row">
                      <label class="col-sm-5 col-form-label">Lead Source</label>
                      <div class="col-sm-7">
                        <select class="custom-select" name="l_source">
                          <option value="">Select Lead Source</option>
                          <?php $__currentLoopData = $source; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sour): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($sour->id); ?>"><?php echo e($sour->name); ?></option>
                          <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                      </div>
                    </div>
                  </div>   
                </div>

                <div class="row">
                  <div class="col-md-6">
                    <div class="form-group row">
                      <label class="col-sm-4 col-form-label">Investment ($)</label>
                      <div class="col-sm-8">
                        <input class="form-control" type="number" name="invest">
                      </div>
                    </div>
                  </div>
                  <div class="col-md-6">
                    <div class="form-group row">
                      <label class="col-sm-5 col-form-label">Trading Experience</label>
                      <div class="col-sm-7">
                        <input class="form-control" type="text" name="expense">
                      </div>
                    </div>
                  </div>
                   
                </div>
                <div class="row">
                  <div class="col-md-6">
                    <div class="form-group row">
                      <label class="col-sm-4 col-form-label">Trading Segment</label>
                      <div class="col-sm-8">
                        <input class="form-control" type="text" name="trade">
                      </div>
                    </div>
                  </div>
                  <div class="col-md-6">
                    <div class="form-group row">
                      <label class="col-sm-5 col-form-label">Assign To</label>
                      <div class="col-sm-7">
                        <select class="custom-select" name="assigned">
                          <option value="0">Select User</option>
                          <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                          <?php if($user->id==Auth::user()->id): ?>

                          <?php else: ?>
                            <option value="<?php echo e($user->id); ?>"><?php echo e($user->name); ?></option>
                          <?php endif; ?>  
                          <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                      </div>
                    </div>
                  </div>

                  
                </div>

                <h4 class="card-title">CONTACT INFORMATION</h4>
               

                <div class="row">
                  <div class="col-md-6">
                        <div class="form-group row">
                          <label class="col-sm-4 col-form-label">Country<span style="color:red;">*</span></label>
                          <div class="col-sm-8">
                            <select class="custom-select" name="country" required>
                                <option value="">Select Country</option>
                                <?php $__currentLoopData = $countries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $country): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($country->id); ?>"><?php echo e($country->name); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                              </select>
                              <?php $__errorArgs = ['Country'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                              <div class="alert alert-danger mt-1 mb-1"><?php echo e($message); ?></div>
                              <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                          </div>
                        </div>
                   </div>
                  <div class="col-md-6">
                    <div class="form-group row">
                      <label class="col-sm-4 col-form-label">Contact Number<span style="color:red;">*</span></label>
                      <div class="col-sm-8">
                        
                          <input type="text" name="phone" maxlength="15" class="form-control" placeholder="Enter Phone Number" required/>
                        
                        <?php $__errorArgs = ['phone'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                          <div class="alert alert-danger mt-1 mb-1"><?php echo e($message); ?></div>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                      </div>
                    </div>
                  </div>
                </div>

                <div class="row">
                  <div class="col-md-6">
                    <div class="form-group row">
                      <label class="col-sm-4 col-form-label">Additional Number</label>
                      <div class="col-sm-8">
                        <input type="text" name="mobile" maxlength="15" class="form-control" placeholder="Enter Your Mobile Number">
                      </div>
                    </div>
                  </div>
                  <div class="col-md-6">
                    <div class="form-group row">
                      <label class="col-sm-4 col-form-label">Email</label>
                      <div class="col-sm-8">
                        <input type="email" name="email" class="form-control" placeholder="Enter Your Email">
                      </div>
                    </div>
                  </div>
                </div>    
              
                <h4 class="card-title">ADDITIONAL INFORMATION</h4>
              
                <div class="row">
                  <div class="col-md-8">
                    <div class="form-group row">
                      <label class="col-sm-3 col-form-label">Description<span style="color:red;">*</span></label>
                      <div class="col-sm-9">
                        <textarea type="text" name="notes" class="form-control" placeholder="Write Something" required></textarea>
                         <?php $__errorArgs = ['Country'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                              <div class="alert alert-danger mt-1 mb-1"><?php echo e($message); ?></div>
                          <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                      </div>
                    </div>
                  </div>
                    <br>
                    <br>
                </div>
                <button type="submit"  class="btn btn-primary" style="margin-right:7px;">Submit</button>
                <a href="<?php echo e(url('/showlead')); ?>"><button type="button" class="btn btn-primary">Cancel</button></a> 

              </form>
              <div class="col-md-12">
                  <div class="form-group row" style="float: right;">
                    <a href="<?php echo e(url('/showlead')); ?>" class="auth-link text-black">Back..
                    </a>
                  </div>
              </div>
            </div>
          </div>
        </div>
      </div>
</main><!-- End #main -->
<script type="text/javascript">
       $("document").ready(function(){
        setTimeout(function()
        {
            $("div.alert").remove();

        }, 3000);

       });

</script>

<!-- <script>
$(document).ready(function() {
$('#country-dropdown').on('change', function() {
var country_id = this.value;
$.ajax({
url: 'get-countrycode-by-country',
method: 'POST',
data: {
country_id: country_id,
_token: '<?php echo e(csrf_token()); ?>' 
},
dataType : 'json',
success: function(response){
   $('#phone-field').val(response[0].phonecode);
}
});
});    
});
</script> -->

<?php $__env->stopSection(); ?>
<?php echo $__env->make('frontend.layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\CRM\resources\views/frontend/newlead.blade.php ENDPATH**/ ?>