<?php $__env->startSection('content'); ?> 
<style>
	body
	{
		background-color:white;
	}
</style>
<div class="container">
    <form id="" action="report" method='GET'>
      <div class="row by amt" style="margin-top:3%;">
        <div class="gc" >
        <div class="gz" style="margin-left:130px;"> 
          <h3> Search Voters by Surname</h3>
       <!--   <div class="row">
              <div class="col-lg-12">
                  <div class="col-lg-3">
                    <input type="text" id="surname" name="surname" class="form-control" placeholder="Surname">
                  </div>
                  <div class="col-lg-2">
                    <select id="IsPoliticallyStrong" name="IsPoliticallyStrong" class="form-control">
                      <option value=""> Is Politically Strong ? </option>
                      <option value="1"> Yes </option>
                      <option value="0"> No </option>
                    </select>
                  </div>
                  <div class="col-lg-2">
                    <select id="Booth" name="Booth" class="form-control">
                      <option value=""> Booth </option>
                    </select>
                  </div>
                  <div class="col-lg-2">
                    <select id="Color" name="Color" class="form-control">
                      <option value=""> Color </option>
                    </select>
                  </div>
                   <div class="col-lg-2">
                    <select id="Dead" name="Dead" class="form-control">
                      <option value=""> Is Dead? </option>
                      <option value="1"> Yes </option>
                      <option value="0"> No </option>                      
                    </select>
                  </div>
              </div>
          </div> -->

             <div class="input-group">
                  <input type="text" id="search" name="search" class="form-control" placeholder="Surname">
                  <div class="fj">
                    <button type="button" onclick="SearchVoterBySurname()"  class="cg fm">
                      <span >Search</span> 
                    </button>
                  </div>
                </div> 
          </div>
        </div>
      </div>
  </form>

    <div class="row" style="margin-top:3%;"> <!-- Displaying Datatable -->
      <div class="col-lg-12">
          <table id="Voters" class="table table-striped table-bordered dt-responsive nowrap">
            <thead>
              <tr>
                <th> NameEnglish </th>
                <th> NameMarathi</th> 
                <th> MobileNumber </th>
                <th> WhatsAppNumber </th>  
                <th> Email </th>
                <th> Age </th> 
                <th> Address </th>
                <th> Sex </th>  
                <th> Education </th>
                <th> Cast </th> 
                <th> Profession </th>
                <th> WardName </th> 
                <th> VotingAnalysis </th> 
                <th> View </th>              
                </tr>
            </thead>
            <tbody>
            </tbody>
          </table>

        <script>
          function SearchVoterBySurname()
          {
             var SearchString=$('#search').val();

             $('#Voters').DataTable({
                  "bProcessing": true,
                    dom: 'Bfrtip',
                    buttons: [
                      'copyHtml5',
                      'excelHtml5',
                      'csvHtml5',
                      'pdfHtml5'
                    ],
                  "sAjaxSource": "reportDemo?surname="+SearchString,
                  "aoColumns": [
                    { "mData": "ID" },
                    { "mData": "MarathiFirstName" },
                    { "mData": "MobileNumber" },
                    { "mData": "Address"},
                    { "mData": "Email" },
                    { "mData": "Sex" },
                    { "mData": "Company" },
                    { "mData": "Designation"},
                    { "mData": "LeadStatus" },
                    { "mData": "Note" },
                    { "mData": "InterestedIn1"},
                    { "mData": "DateTime" }
                  ]
                });
          }
            </script>
      </div>
    </div>
 </div>

</div>

</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.votermainview', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>