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

 <!-- Include Bootstrap Wizard -->
<style type="text/css">
#installationForm .tab-content {
    /*margin-top: 40px;*/
}
body {
   font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
   font-size: 14px;
   line-height: 1.6;
   color: #1e3948;
   /*background-color: #f5f8fa; */
}
</style>

<script>
  function loadZoneNames()
  {
      var StateId=$('#States').val();
      // Get State Name
      $.ajax({
          type: "GET",
          url: "getZoneNames",
          data:"stateid="+StateId,
          dataType: "json",
          success: function(result){
               $('#Zones').children().remove();         
               $('#Zones').append($('<option>').text("Zone").attr('value', ""));
              $.each(result, function(id, value) {
                $('#Zones').append($('<option>').text(value.ZoneName).attr('value', value.ZoneID));
              });
            }
          });
  }

  function loadDistrictNames()
  {
      var StateId=$('#States').val();
      var ZoneId=$('#Zones').val();
      // Get State Name
      $.ajax({
          type: "GET",
          url: "getDistrictNames",
          data:"zoneid="+ZoneId,
          dataType: "json",
          success: function(result){
               $('#Districts').children().remove();         
               $('#Districts').append($('<option>').text("District").attr('value', ""));
               $.each(result, function(id, value) {
                  $('#Districts').append($('<option>').text(value.DistrictName).attr('value', value.DistrictID));
               });
            }
          });
  }

 function loadTehsilNames()
  {
      var DistrictId=$('#Districts').val();
      // Get State Name
      $.ajax({
          type: "GET",
          url: "getTehsilNames",
          data:"districtid="+DistrictId,
          dataType: "json",
          success: function(result){
               $('#Tehsils').children().remove();         
               $('#Tehsils').append($('<option>').text("Tehsil").attr('value', ""));
               $.each(result, function(id, value) {
                  $('#Tehsils').append($('<option>').text(value.TehsilName).attr('value', value.TehsilID));
               });
            }
       });
  }

  function loadVillageNames()
  {
      var TehsilId=$('#Tehsils').val();
      // Get State Name
      $.ajax({
          type: "GET",
          url: "getVillageNames",
          data:"tehsilid="+TehsilId,
          dataType: "json",
          success: function(result){
               $('#Villages').children().remove();         
               $('#Villages').append($('<option>').text("Village").attr('value', ""));
               $.each(result, function(id, value) {
                  $('#Villages').append($('<option>').text(value.VillageName).attr('value', value.VillageID));
               });
            }
       });
  }

  function loadVillageName()
  {
      var CityId=$('#Villages').val();
      // Get State Name
      $.ajax({
          type: "GET",
          url: "getVillageNameById",
          data:"villageid="+CityId,
          dataType: "json",
          success: function(result){
              $.each(result, function(id, value) {
                  $("#Village").val(value.VillageName);
                });
              }
       });   
  }

  // Load City or Village if 

  function loadCityOrVillage()
  {
    if(document.getElementById("City").checked==true)  // City is Selected then Add 
    {
      // if City is checked
         var TehsilId=$('#Tehsils').val();
              // Get State Name
              $.ajax({
                  type: "GET",
                  url: "getCityNames",
                  data:"tehsilid="+TehsilId,
                  dataType: "json",
                  success: function(result){
                       $('#Citys').children().remove();         
                       $('#Citys').append($('<option>').text("City").attr('value', ""));
                       $.each(result, function(id, value) {
                          $('#Citys').append($('<option>').text(value.CityName).attr('value', value.CityID));
                       });
                    }
               });
    }
    else if(document.getElementById("Village").checked==true)
    {
      // if Village is checked
        var TehsilId=$('#Tehsils').val();
        // Get State Name
        $.ajax({
            type: "GET",
            url: "getVillageNames",
            data:"tehsilid="+TehsilId,
            dataType: "json",
            success: function(result){
                $('#Villages').children().remove();         
                $('#Villages').append($('<option>').text("Village").attr('value', ""));
                $.each(result, function(id, value) {
                    $('#Villages').append($('<option>').text(value.VillageName).attr('value', value.VillageID));
              });
            }
       });
    }
  }

 function showCity()
  {
            $("#VillageId").hide();
            $("#CityId").show();

            // Load Cities from Tehsil
             var TehsilId=$('#Tehsils').val();
              // Get State Name
              $.ajax({
                  type: "GET",
                  url: "getCityNames",
                  data:"tehsilid="+TehsilId,
                  dataType: "json",
                  success: function(result){
                       $('#Citys').children().remove();         
                       $('#Citys').append($('<option>').text("City").attr('value', ""));
                       $.each(result, function(id, value) {
                          $('#Citys').append($('<option>').text(value.CityName).attr('value', value.CityID));
                       });
                    }
               });

  }

  function showVillage()
  {
            $("#CityId").hide();
            $("#VillageId").show();
            var TehsilId=$('#Tehsils').val();
            // Get State Name
            $.ajax({
                type: "GET",
                url: "getVillageNames",
                data:"tehsilid="+TehsilId,
                dataType: "json",
                success: function(result){
                    $('#Villages').children().remove();         
                       $('#Villages').append($('<option>').text("Village").attr('value', ""));
                       $.each(result, function(id, value) {
                          $('#Villages').append($('<option>').text(value.VillageName).attr('value', value.VillageID));
                       });
                    }
             });
  }

 function showCity1()
  {
            $("#Village1").hide();
            $("#City1").show();
            // Load Cities from Tehsil
             var TehsilId=$('#Tehsil').val();
              // Get State Name
              $.ajax({
                  type: "GET",
                  url: "getCityNames",
                  data:"tehsilid="+TehsilId,
                  dataType: "json",
                  success: function(result){
                       $('#City').children().remove();         
                       $('#City').append($('<option>').text("City").attr('value', ""));
                       $.each(result, function(id, value) {
                          $('#City').append($('<option>').text(value.CityName).attr('value', value.CityID));
                       });
                    }
               });
  }

  function showVillage1()
  {
            $("#City1").hide();
            $("#Village1").show();

            var TehsilId=$('#Tehsil').val();
            // Get State Name
            $.ajax({
                type: "GET",
                url: "getVillageNames",
                data:"tehsilid="+TehsilId,
                dataType: "json",
                success: function(result){
                    $('#Village').children().remove();         
                       $('#Village').append($('<option>').text("Village").attr('value', ""));
                       $.each(result, function(id, value) {
                          $('#Village').append($('<option>').text(value.VillageName).attr('value', value.VillageID));
                       });
                    }
             });
  }

  function loadBooths()
  {
      var TehsilId=$('#Tehsil').val();
      // Get State Name
      var Village_Or_City_Id=0;

      //Check if is City or village
      var IsCity=0;
      if(document.getElementById("Ci").checked==true)
      {
        IsCity=1;
        Village_Or_City_Id=$("#Citys").val();
      }
      else if(document.getElementById("Vi").checked==true)
      {
        IsCity=0;
        Village_Or_City_Id=$("#Villages").val();
      }

      $.ajax({
        type: "GET",
        url: "getBoothsNumbersById",
        data:"Village_Or_City_Id="+Village_Or_City_Id,
          dataType: "json",
                  success: function(result){
                      $.each(result, function(id, value) {
                          $('#Booth').val(value.BoothNumber);
                    });

                      // Load Voters Of City Or Village By Booth

                    $.ajax({
                          type: "GET",
                          url: "getVotersByVillageOrCity",
                          data:"Village_Or_City_Id="+Village_Or_City_Id+"&IsCity="+IsCity,
                          dataType: "json",
                          success: function(result){
                               $('#Voters').children().remove();         
                               $('#Voters').append($('<option>').text("Voters").attr('value', ""));
                               $.each(result, function(id, value) {
                                  $('#Voters').append($('<option>').text(value.EnglishFirstName+" "+value.EnglishLastName+" |"+value.MobileNumber).attr('value', value.VoterID));
                               });
                          }
                     });

                  }
             });
  }

  function loadVoterDetails()
  {
      // load Voter
      var VoterId=$("#Voters").val();
      var WardName="";
    /*

    FirstName , ModdleName , LastName ,FirstNameMarathi , ModdleNameMarathi , LastNameMarathi,
    MobileNumber,  WhatsAppMobileNumber , Male , Female ,  OldAddress , NewAddress ,State ,Zone,District,Tehsil,City,
    Village , Villagei , Cityi ,BoothV , Education , Birthday , Religion,  Cast ,IsDeada , IsDeadb , 
    VoterId,VotingDoneA,VotingDoneB,IsPoliticalPersonY , IsPoliticalPersonN ,
    White ,
    Est1
    */
      $.ajax({
          type: "GET",
          url: "getVoterDetailById",
          data:"VoterId="+VoterId,
          dataType: "json",
          success: function(result){
             $.each(result.Voters, function(id, value) {
                  $("#FirstName").val(value.EnglishFirstName);
                  $("#ModdleName").val(value.EnglishMiddleName);
                  $("#LastName").val(value.EnglishLastName);

                  $("#FirstNameMarathi").val(value.MarathiFirstName);
                  $("#ModdleNameMarathi").val(value.MarathiMiddleName);
                  $("#LastNameMarathi").val(value.MarathiLastName);

                  $("#MobileNumber").val(value.MobileNumber);
                  $("#WhatsAppMobileNumber").val(value.WhatsAppNumber);

                  $("#OldAddress").val(value.Address); 
                  $("#NewAddress").val(value.NewAddress); 
                  $("#Education").val(value.Education); 
                  $("#Birthday").val(value.DateofBirth);
                  $("#Age").val(value.Age);
                  $("#Cast").select2("val",value.Cast);
                  $('#Education').val(value.Education);
             });
          }
      });
  }

  function loadZoneD()
  {
        var StateId=$('#State').val();
        // Get State Name
        $.ajax({
          type: "GET",
          url: "getZoneNames",
          data:"stateid="+StateId,
          dataType: "json",
          success: function(result){
               $('#Zone').children().remove();         
               $('#Zone').append($('<option>').text("Zone").attr('value', ""));
              $.each(result, function(id, value) {
                $('#Zone').append($('<option>').text(value.ZoneName).attr('value', value.ZoneID));
              });
            }
          });
      $('#Tehsil').select2('val','');    
      $('#District').select2('val','');  
      $('#Tehsil').select2('val','');
      $('#City').select2('val','');
      $('#Village').select2('val','');
      $('#BoothV').select2('val','');
  }

  function loadDistrictD()
  {
    var ZoneId=$('#Zone').val();
      // Get State Name
      $.ajax({
          type: "GET",
          url: "getDistrictNames",
          data:"zoneid="+ZoneId,
          dataType: "json",
          success: function(result){
               $('#District').children().remove();         
               $('#District').append($('<option>').text("District").attr('value', ""));
               $.each(result, function(id, value) {
                  $('#District').append($('<option>').text(value.DistrictName).attr('value', value.DistrictID));
               });
            }
      });
      $('#District').select2('val','');
      $('#Tehsil').select2('val','');
      $('#City').select2('val','');
      $('#Village').select2('val','');
      $('#BoothV').select2('val','');
  }

  function loadTehsilD()
  {
    var DistrictId=$('#District').val();
      // Get State Name
      $.ajax({
          type: "GET",
          url: "getTehsilNames",
          data:"districtid="+DistrictId,
          dataType: "json",
          success: function(result){
               $('#Tehsil').children().remove();         
               $('#Tehsil').append($('<option>').text("Tehsil").attr('value', ""));
               $.each(result, function(id, value) {
                  $('#Tehsil').append($('<option>').text(value.TehsilName).attr('value', value.TehsilID));
               });
            }
       });
      $('#Tehsil').select2('val','');
      $('#City').select2('val','');
      $('#Village').select2('val','');
      $('#BoothV').select2('val','');
  }

  function loadCityVillageD()
  {
     if(document.getElementById("Cityi").checked==true)  // City is Selected then Add 
        {
          // if City is checked
             var TehsilId=$('#Tehsils').val();
                  // Get State Name
                  $.ajax({
                      type: "GET",
                      url: "getCityNames",
                      data:"tehsilid="+TehsilId,
                      dataType: "json",
                      success: function(result){
                           $('#City').children().remove();         
                           $('#City').append($('<option>').text("City").attr('value', ""));
                           $.each(result, function(id, value) {
                              $('#City').append($('<option>').text(value.CityName).attr('value', value.CityID));
                           });
                        }
                   });

          $('#City').select2('val','');
          $('#Village').select2('val','');
          $('#BoothV').select2('val','');
        }
        else if(document.getElementById("Villagei").checked==true)
        {
          // if Village is checked
            var TehsilId=$('#Tehsil').val();
             // Get State Name
            $.ajax({
                type: "GET",
                url: "getVillageNames",
                data:"tehsilid="+TehsilId,
                dataType: "json",
                success: function(result){
                    $('#Village').children().remove();         
                    $('#Village').append($('<option>').text("Village").attr('value', ""));
                    $.each(result, function(id, value) {
                        $('#Village').append($('<option>').text(value.VillageName).attr('value', value.VillageID));
                  });
                }
           });
          $('#City').select2('val','');
          $('#Village').select2('val','');
          $('#BoothV').select2('val','');
        }
  }

function loadBooth()
  {
      var TehsilId=$('#Tehsil').val();
      // Get State Name
      var Village_Or_City_Id=0;

      //Check if is City or village
      var IsCity=0;
      if(document.getElementById("Cityi").checked==true)
      {
        IsCity=1;
        Village_Or_City_Id=$("#City").val();
      }
      else if(document.getElementById("Villagei").checked==true)
      {
        IsCity=0;
        Village_Or_City_Id=$("#Village").val();
      }

      $.ajax({
        type: "GET",
        url: "getBoothsNumbersById",
        data:"Village_Or_City_Id="+Village_Or_City_Id,
          dataType: "json",
          success: function(result){
            $('#BoothV').children().remove();         
            $('#BoothV').append($('<option>').text("Booth Number").attr('value', ""));
            $.each(result, function(id, value) {
               $('#BoothV').append($('<option>').text(value.BoothNumber).attr('value', value.BoothID));
            });
          }
       });
       $('#BoothV').select2('val','');
  }

  function SearchVoters()
  {
    var LastName=$("#SearchLastName").val();
    var FirstName=$("#SearchFirstName").val();
    var MiddleName=$("#SearchMiddleName").val();
    $.ajax({
        type: "GET",
        url: "SearchVoters",
        data:"LastName="+LastName+"&FirstName="+FirstName+"&MiddleName="+MiddleName,
          dataType: "json",
          success: function(result){
            $('#Voters').children().remove();
            //alert("Message "+ result.Message);
            document.getElementById("messages").innerHTML=result.Message;
            $('#Voters').append($('<option>').text(" मतदार ").attr('value', ""));
            $.each(result.Data, function(id, value) {
               $('#Voters').append($('<option>').text(value.MarathiLastName + " "+ value.MarathiFirstName +" "+value.MarathiMiddleName ).attr('value', value.VoterID));
            });
          }
       });

  }
</script>

 <div class="qv rc sm sp" > <!-- style="margin-top:3%;" -->
        <div class="qw">
            <?php if(Session::has('Name')): ?>   
              <span style="margin-left:70px;"> <strong>  मतदार माहिती बदल करा  </strong> </span>
            <span style="margin-top:-7px;margin-left:55%;">Welcome, <?php echo e(Session::get('Name')); ?>

            <a href='dashboard' class='cg ts fx green' style="margin-left:80px;"> Go To Dashboard </a>
          <?php endif; ?>
        </div>
  </div>

  <form id="EditVoterForm" name="EditVoterForm" action="EditVoter" role="form">
   
<div class="by amt">
  <div class="gc">
    <div class="gz">
      <div class="ca qo anx ">
        <div class="qf b aml" style="width:200%;" >
          <div class="row">
              <div class="col-lg-3"></div>
                <div class="col-lg-6">
                   <!-- Errors And Success Messages -->
                   <?php if(count($errors)>0): ?>
                    <div class="alert alert-danger">
                       <ul>
                          <?php foreach($errors->all() as $error): ?>
                            <div class="alert pv alert-dismissible alert-danger" role="alert">
                                  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                  <font style="color:#f5f5f5"><li> <?php echo e($error); ?> </li></font>
                            </div>
                           <p/>
                          <?php endforeach; ?>
                       </ul>
                   </div>
                  <?php endif; ?>
                   </p>
                           <?php if(Session::has('success')): ?>
                            <div class="alert pv alert-dismissible alert-success" role="alert">
                              <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                               <font style="color:#f5f5f5"> <?php echo e(Session::get('success')); ?>  </font>
                            </div>
                            <?php endif; ?>

                            <?php if(Session::has('error')): ?>
                              <div class="alert pv alert-dismissible alert-danger" role="alert">
                                  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                  <font style="color:#f5f5f5"> <?php echo e(Session::get('error')); ?>  </font>
                              </div>
                            <?php endif; ?>
                   </div>
                  <div class="col-lg-3"></div>
              </div>

             <div class="row">
                        <div class="col-lg-12">
                          <div class="col-lg-3">
                               <input id="SearchLastName" name="SearchLastName" type="text" class="form-control" placeholder="आडनाव (*)">
                            </div> 
                            <div class="col-lg-3">
                                <input id="SearchFirstName" name="SearchFirstName" type="text" class="form-control" placeholder="नाव (*)" title="First Name">
                            </div>
                            <div class="col-lg-3">
                                <input id="SearchMiddleName" name="SearchMiddleName" type="text" class="form-control" placeholder="वडिलांचे / पतीचे नाव ">
                            </div>                                            
                               
                            <div class="col-lg-3">
                                <input type="button"  value="मतदार दाखवा " onclick="SearchVoters()" class="cg fp">
                            </div>                  
                        </div>
            </div>
              <div class="row">
                <div class="col-lg-12">

                   <div class="col-lg-12">
                    <h4> <label id="messages"></label> </h4>
                   </div>                               
                </div>
              </div>
            <div class="row" style="margin-top:2%;">
              <div class="col-lg-10">
                  <select id="Voters" name="Voters" onchange="loadVoterDetails()" class="form-control" style="width:100%;" >
                      <option> मतदार निवडा</option>
                  </select>
              </div>
              <div class="col-lg-2">
                 <!--  <button class="cg ts fx">
                     <span class="icon icon-add-user"></span> Follow
                  </button> -->
              </div>
            </div>
        </div>
        <div class="qf b aml" style="width:200%;">
            <h4> वैयक्तिक माहिती </h4>
              <p/>
                  <div class="row">
                        <div class="col-lg-12">
                            <div class="col-lg-4">
                                <input id="FirstName" name="FirstName" type="text" class="form-control" placeholder=" Name (*) ">
                            </div>
                            <div class="col-lg-4">
                                <input id="ModdleName" name="ModdleName" type="text" class="form-control" placeholder=" Fathers / Husbands Name" >
                            </div>                                            
                            <div class="col-lg-4">
                                <input id="LastName" name="LastName" type="text" class="form-control" placeholder="Surname (*)" >
                            </div>                      
                        </div>
                    </div><p/> 
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="col-lg-4">
                                <input id="FirstNameMarathi" name="FirstNameMarathi" type="text" class="form-control"  placeholder=" नाव  (*)">
                            </div>
                            <div class="col-lg-4">
                                <input id="ModdleNameMarathi" name="ModdleNameMarathi" type="text" class="form-control"  placeholder="वडिलांचे / पतीचे नाव ">
                            </div>                                            
                            <div class="col-lg-4">
                                <input id="LastNameMarathi" name="LastNameMarathi"  type="text" class="form-control"  placeholder="आडनाव  (*)">
                            </div>                      
                        </div>
                    </div>
                    <p/>
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="col-lg-4"> 
                                <input type="text" name="MobileNumber"  id="MobileNumber"  class="form-control" placeholder=" मोबाईल नंबर ">
                            </div>
                            <div class="col-lg-4">
                                <input type="text" name="WhatsAppMobileNumber" id="WhatsAppMobileNumber"  class="form-control" placeholder=" व्हाट्सएप मोबाईल नंबर ">
                            </div>
                              <div class="col-lg-4">
                                  <input type="text" id="Age" name="Age" placeholder="वय" readonly class="form-control">
                                </div> 
                        </div>
                    </div>
                    <p/>
                   <div class="row">
                        <div class="col-lg-12"> 
                            <div class="col-lg-4">
                              <textarea id="OldAddress" name="OldAddress" class="form-control" readonly placeholder=" मतदान कार्ड वरील पत्ता "></textarea>
                            </div>
                            <div class="col-lg-4">
                                <textarea id="NewAddress" name="NewAddress" class="form-control" placeholder="  बदलला मतदान कार्ड वरील पत्ता" ></textarea>
                            </div>
                            
                        </div>
                    </div>
                    <p/>
                          <div class="row">
                              <div class="col-lg-12">
                                    <div class="col-lg-3">
                                      <select id="Education" name="Education" class="form-control select2-select" style="width:100%;">
                                          <option value=""> शिक्षण </option>
                                          <option value="दहावी">  दहावी </option> 
                                          <option value="बारावी">  बारावी</option> 
                                          <option value="डिप्लोमा">  डिप्लोमा </option> 
                                          <option value="पदवीधर"> पदवीधर </option> 
                                          <option value="पदव्युत्तर" >  पदव्युत्तर </option> 
                                          <option value="इतर">   इतर </option>
                                      </select>
                                    </div>
                                    <div class="col-lg-6">
                                        <div class="date">
                                            <div class="input-group input-append date" id="datePicker">
                                                <input type="text" class="form-control" name="Birthday" id="Birthday" onchange="calculate()"  placeholder="जन्म तारीख [ वर्ष - महिना -तारीख (उदा. 31-07-1982) ]" title="जन्म तारीख [ वर्ष - महिना -तारीख (उदा. 31-07-1982) ]" />
                                                <span class="input-group-addon add-on"><span class="glyphicon glyphicon-calendar"></span></span>
                                            </div>
                                        </div>

                                       <script>
                                         $(document).ready(function() {
                                         $('#datePicker')
                                         .datepicker({
                                           format: 'dd-mm-yyyy'
                                          })
                                        });
                                         // mm/dd/yyyy

                                         function calculate()
                                         {
                                                var Birthday=new Date($("#Birthday").val());
                                                var day = Birthday.getDay();
                                                var month =  Birthday.getMonth()+1;
                                                var year = Birthday.getFullYear();
                                                var age = 18;
                                                var mydate = new Date();
                                                mydate.setFullYear(year, month-1, day);

                                                var currdate = new Date();
                                                var setDate = new Date();
                                                setDate.setFullYear(mydate.getFullYear() + age, month-1, day);

                                                if ((currdate - setDate) > 0){
                                                    //alert("above 18");
                                                }else{
                                                  alert("Age is below 18  ");
                                                }
                                         }
                                      </script>
                                    </div>
                                  <div class="col-lg-3">
                                    <select id="Cast" name="Cast" class="form-control">
                                        <option value=""> जात निवडा </option>
                                            <?php foreach($Casts as $Cast): ?>
                                              <option value="<?php echo e($Cast->CastName); ?>"> <?php echo e($Cast->CastName); ?> </option>
                                            <?php endforeach; ?>
                                     </select>
                                    </div>
                                </div>
                            </div>
                            <p/>

                            <input type="submit" value="माहितीत बदल करा " class="cg fp" style="margin-top:20px;">
             </div>
        </div>
      </div>
    </div>
  </div>
  </form>

<script>
  function format(item) { return item.LastNameMarathi; }
  $(document).ready(function() {
      $("#VillageId").hide();
        $("#CityId").hide();

        $("#City1").hide();
        $("#Village1").hide();
        $("#Cast").select2();
     
/*  var jresults;

    $.getJSON("SearchLastName").done(
        function( data ) {
            $.jresults = data;
            $("#SearchLastName").select2(
                {formatResult: format,
                 formatSelection: format,
                 data: $.jresults }
            );
        }
    );
*/
        $("#City").select2();
        $("#Village").select2();

        $("#States").select2();
        $("#Zones").select2();
        $("#Districts").select2();
        $("#Tehsils").select2();
        $("#Villages").select2();
        $("#Citys").select2();
        $("#Voters").select2();
        $("#BoothV").select2();
        //$("#Education").select2();

        $("#WardName").select2();
        $("#State").select2();
        $("#Zone").select2();
        $("#District").select2();
        $("#Tehsil").select2();
     });

  $('#EditVoterForm')
        .formValidation({
            framework: 'bootstrap',
            icon: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            // This option will not ignore invisible fields which belong to inactive panels
         excluded: ':disabled',
            fields: {
                FirstName: {
                    validators: {
                        notEmpty: {
                            message: 'The First Name is required'
                        }
                    }
                },
                LastName: {
                    validators: {
                        notEmpty: {
                            message: 'The Last Name is required'
                        }
                    }
                },
                FirstNameMarathi: {
                    validators: {
                        notEmpty: {
                            message: 'The First Name in Marathi is required'
                        }
                    }
                },
                LastNameMarathi: {
                    validators: {
                        notEmpty: {
                            message: 'The Last Name in Marathi is required'
                        }
                    }
                },
                
                OldAddress:{
                    validators:{
                        notEmpty:{
                            message:"The Address from Voting Card is required"
                        }
                    }
                },
                Gender: {
                    validators: {
                        notEmpty: {
                            message: 'The Gender is required'
                        }
                    }
                },
                Birthday1: {
                    validators: {
                        notEmpty: {
                            message: 'The date is required'
                        },
                        date: {
                            format: 'MM/DD/YYYY',
                            message: 'The date is not a valid'
                        }
                    }
                },
                IsDead:{
                    validators:{
                        notEmpty:{
                            message:"Please Select Dead Status"
                        }
                    }
                },
                State:{
                    validators:{
                        notEmpty:{
                            message:"Please Select State"
                        }
                    }
                },
                Zone:{
                    validators:{
                        notEmpty:{
                            message:"Please Select Zone"
                        }
                    }
                },
                District:{
                    validators:{
                        notEmpty:{
                            message:"Please Select District"
                        }
                    }
                },   
                Tehsil:{
                    validators:{
                        notEmpty:{
                            message:"Please Select Tehsil"
                        }
                    }
                },  
                VoterId:{
                    validators:{
                        notEmpty:{
                            message:"The VoterId is required"
                        }
                    }
                },
                IsVoteDone:{
                    validators:{
                        notEmpty:{
                            message:"The Voting Status is required"
                        }
                    }
                },   
                IsPoliticalPerson:{
                    validators:{
                        notEmpty:{
                            message:"The Person Status is required"
                        }
                    }
                },                                            
                Estimated:{
                    validators:{
                        notEmpty:{
                            message:"The Estimated Status is required"
                        }
                    }
                },               
              }
        }).find('[name="MobileNumber"]').mask('99 99 99 99 99');;

      function validateTab(index) {

         var fv   = $('#EditVoterForm').data('formValidation'), // FormValidation instance
            // The current tab
            $tab = $('#EditVoterForm');

          // Validate the container
          fv.validateContainer($tab);

          var isValidStep = fv.isValidContainer($tab);
          if (isValidStep === false || isValidStep === null) {
              // Do not jump to the target tab
              return false;
          }
          return true;
    }
</script>
      <div class="qv rc aok">
        <div class="qw">
        <strong>   <a href="http://www.sterlingsys.in" style="text-decoration:none;" target="_blank"> © STERLING SYSTEMS PVT. LTD. </a></strong>
        </div>
      </div>
<?php $__env->stopSection(); ?>

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