<?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) {
                  //$('#Voters').append($('<option>').text(value.EnglishFirstName+" "+value.EnglishLastName+" |"+value.MobileNumber).attr('value', value.SrNo));
                  $("#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);
                  $("#Email").val(value.Email);   
                  if(value.Sex=="M")
                  {
                    document.getElementById("Male").checked=true;
                  }
                  else if(value.Sex=="F")
                  {
                    document.getElementById("Female").checked=true;
                  }
                  $("#OldAddress").val(value.Address); 
                  $("#NewAddress").val(value.NewAddress); 
                  $("#Education").val(value.Education); 
                  $("#Birthday").val(value.DateofBirth);

                  if(value.IsDead==0)
                  {
                   document.getElementById("IsDeadb").checked=true; 
                  }
                  else if(value.IsDead==1)
                  {
                    document.getElementById("IsDeada").checked=true;
                  }

                  if(value.IsPoliticallyStrong==1)
                  {
                   document.getElementById("IsPoliticalPersonY").checked=true; 
                  }
                  else if(value.IsPoliticallyStrong==0)
                  {
                    document.getElementById("IsPoliticalPersonN").checked=true;
                  }

                  $("#EPICNumber").val(value.EPICNumber);
                  
                  if(value.IsVoted==1)
                  {
                   document.getElementById("VotingDoneA").checked=true; 
                  }
                  else if(value.IsVoted==0)
                  {
                    document.getElementById("VotingDoneB").checked=true;
                  }
//Green ,  Red , Yellow , White
                  if(value.VotingAnalysis=="इतर")
                  {
                    document.getElementById("White").checked=true;
                  }
                  else if(value.VotingAnalysis=="आपला")
                  {
                    document.getElementById("Green").checked=true;
                  }
                  else if(value.VotingAnalysis=="विरोधी")
                  {
                    document.getElementById("Red").checked=true;
                  }
                  else if(value.VotingAnalysis=="संदिग्ध")
                  {
                    document.getElementById("Yellow").checked=true;
                  }

                  $("#Age").val(value.Age);
                  $("#Cast").val(value.Cast);
                  $('#Profession').val(value.Profession);
                  $('#Education').val(value.Education);
                  if(value.IsHandicapped==0)//document.getElementById(value.VotingAnalysis).checked=true;)
                  {
                    document.getElementById("IsHandicappedN").checked=true;
                  }
                  else if(value.IsHandicapped==1)
                  {
                    document.getElementById("IsHandicappedY").checked=true;
                  }
                  WardName=value.WardName;

             });

             $('#WardName').children().remove();         
             $('#WardName').append($('<option>').text("Ward Name").attr('value', ""));
             $.each(result.States, function(id, value) {
                  $('#WardName').append($('<option>').text(value.StateName).attr('value', value.StateID));
             });

            // Select Ward Name
            $('#WardName').select2("val",WardName);

             $('#State').children().remove();         
             $('#State').append($('<option>').text("States").attr('value', ""));
             $.each(result.States, function(id, value) {
                  $('#State').append($('<option>').text(value.StateName).attr('value', value.StateID));
             });

            // Select State
            $('#State').select2("val", result.SelectState);
            // Select Zone
             $('#Zone').children().remove();         
             $('#Zone').append($('<option>').text("Zones").attr('value', ""));
             $.each(result.Zones, function(id, value) {
                  $('#Zone').append($('<option>').text(value.ZoneName).attr('value', value.ZoneID));
             });

              // Select State
             $('#Zone').select2("val", result.SelectZone);
            // Select Zone
             $('#District').children().remove();         
             $('#District').append($('<option>').text("Districts").attr('value', ""));
             $.each(result.Districts, function(id, value) {
                  $('#District').append($('<option>').text(value.DistrictName).attr('value', value.DistrictID));
             });
              // Select Dist         
              $('#District').select2("val", result.SelectDistrict);
            // Select Tehsil
             $('#Tehsil').children().remove();         
             $('#Tehsil').append($('<option>').text("Tehsils").attr('value', ""));
             $.each(result.Tehsils, function(id, value) {
                  $('#Tehsil').append($('<option>').text(value.TehsilName).attr('value', value.TehsilID));
             });

              // Select Tehsil
              $('#Tehsil').select2("val", result.SelectTehsil);

              if(result.IsCity==1)
              {
                 $("#City1").show();
                 $("#Village1").hide();
                 document.getElementById("Cityi").checked=true;

                 $('#City').children().remove();         
                 $('#City').append($('<option>').text("Cities").attr('value', ""));
                 $.each(result.Citys_Villages, function(id, value) {
                      $('#City').append($('<option>').text(value.CityName).attr('value', value.CityID));
                 });
                  // Select Tehsil
                  $('#City').select2("val", result.SelectCity_Village); 
              }
              else if(result.IsCity==0)
              {

                $("#City1").hide();
                $("#Village1").show();
                 document.getElementById("Villagei").checked=true;
                 $('#Village').children().remove();
                 $('#Village').append($('<option>').text("Villages").attr('value', ""));
                 $.each(result.Citys_Villages, function(id, value) {
                      $('#Village').append($('<option>').text(value.VillageName).attr('value', value.VillageID));
                 });

                  // Select Tehsil

                 $('#Village').select2("val", result.SelectCity_Village);                  
              }
              // Booths
                 $('#BoothV').children().remove();         
                 $('#BoothV').append($('<option>').text("Booth").attr('value', ""));
                 $.each(result.Booths, function(id, value) {
                      $('#BoothV').append($('<option>').text(value.BoothNumber).attr('value', value.BoothID));
                 });

                  // Select Tehsil
                 $('#BoothV').select2("val", result.SelectBooth);
          }
      });
  }

  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','');
  }
</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="row" style="margin-left:7%;margin-top:3%;width:85%;">
        <div class="col-lg-12" >
          <h3> Edit Voter Information </h3>
          <h5 style="margin-left:70%;">
            <?php if(Session::has('Name')): ?>
              Welcome, <?php echo e(Session::get('Name')); ?>

            <?php endif; ?>
          </h5>
        <hr>
      </div>
    </div> -->
<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-2">                        
                     <select id="States" name="States" onchange="loadZoneNames()" class="form-control">
                        <option value=""> राज्य </option>
                         <?php foreach($States as $state): ?>
                           <option value="<?php echo e($state->StateID); ?>"><?php echo e($state->StateName); ?></option>
                        <?php endforeach; ?>
                     </select>
                    </div>
                    <div class="col-lg-2">
                       <select id="Zones" name="Zones"  onchange="loadDistrictNames()" class="form-control">
                         <option value=""> विभाग  </option>
                       </select>
                    </div>                                            
                    <div class="col-lg-2">
                       <select id="Districts" name="Districts" onchange="loadTehsilNames()" class="form-control">
                          <option value=""> जिल्हा  </option>
                        </select>
                    </div>
                    <div class="col-lg-2">
                       <select id="Tehsils" name="Tehsils" onchange="loadCityOrVillage()" class="form-control">
                          <option value=""> तालुका  </option>
                        </select>
                    </div>
                    <div class="col-lg-2">
                      <div class="bv" data-example-id="" style="margin-top:5px;">
                        <div class="ew ug ul">
                          <label>
                          <input type="radio" id="Ci" name="CityOrVillage"  value="City" onclick="showCity()"/>
                           <span class="uh"></span>
                             शहर
                          </label>
                       </div>
                       <div class="ew ug ul">
                         <label>
                            <input type="radio" id="Vi" name="CityOrVillage"  value="Village" onclick="showVillage()" />
                            <span class="uh"></span>
                              गाव
                             </label>
                        </div>
                       </div>
                      </div>

                      <div class="col-lg-2">
                        <div id="CityId" >
                          <select id="Citys" name="Citys" onchange="loadBooths()"  class="form-control" style="width:100%;" >
                             <option> शहर </option>
                           </select>
                        </div>
                        <div id="VillageId">
                          <select id="Villages" name="Villages" onchange="loadBooths()"  class="form-control" style="width:100%;" >
                            <option> गाव </option>
                          </select>
                        </div>
                      </div>
                    </div>
            </div>
            <p/>
            <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="नाव (*)" title="First Name">
                            </div>
                            <div class="col-lg-4">
                                <input id="ModdleName" name="ModdleName" type="text" class="form-control" placeholder="वडिलांचे / पतीचे नाव ">
                            </div>                                            
                            <div class="col-lg-4">
                                <input id="LastName" name="LastName" type="text" class="form-control" placeholder="आडनाव (*)">
                            </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" title="In English" placeholder=" नाव (In English) (*)">
                            </div>
                            <div class="col-lg-4">
                                <input id="ModdleNameMarathi" name="ModdleNameMarathi" type="text" class="form-control" title="In English" placeholder="वडिलांचे / पतीचे नाव (In English)">
                            </div>                                            
                            <div class="col-lg-4">
                                <input id="LastNameMarathi" name="LastNameMarathi"  type="text" class="form-control" title="In English" placeholder="आडनाव (In English) (*)">
                            </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">
                                <div class="bv" data-example-id="" style="margin-top:5px;">
                                    <strong> लिंग &nbsp; : </strong>
                                    <div class="ew ug ul">
                                      <label>
                                        <input type="radio" id="Male" name="Gender"   value="M" />
                                        <span class="uh"></span>
                                             पुरुष
                                      </label>
                                    </div>
                                    <div class="ew ug ul">
                                      <label>
                                        <input type="radio" id="Female" name="Gender"  value="F"  />
                                        <span class="uh"></span>
                                            स्त्री
                                      </label>
                                    </div>
                                </div>
                            </div> 
                        </div>
                    </div>
                    <p/>
                   <div class="row">
                        <div class="col-lg-12"> 
                            <div class="col-lg-4">
                              <input type="text" name="Email" id="Email" class="form-control" placeholder="इमेल">
                            </div>                          
                            <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="State" name="State" onchange="loadZoneD()" class="form-control" style="width:100%;" >
                                  <option>  राज्य  </option>
                               </select>
                             </div>
                              <div class="col-lg-3">
                                    <select id="Zone" name="Zone" onchange="loadDistrictD()" class="form-control" style="width:100%;" >
                                        <option> विभाग </option>
                                    </select>
                              </div>                                            
                              <div class="col-lg-3">
                                    <select id="District" name="District" onchange="loadTehsilD()" class="form-control" style="width:100%;" >
                                        <option> जिल्हा </option>
                                    </select>
                              </div>
                              <div class="col-lg-3">
                                    <select id="Tehsil" name="Tehsil" onchange="loadCityVillageD()" class="form-control" style="width:100%;" >
                                        <option> तालुका </option>
                                    </select>
                              </div>
                            </div>
                          </div>
                          <p/>
                          <div class="row">
                            <div class="col-lg-12">
                              <div class="col-lg-3">
                                    <div class="bv" data-example-id="" style="margin-top:5px;">
                                        <div class="ew ug ul">
                                          <label>
                                            <input type="radio" id="Cityi" name="CityOrVillage1" value="City" onclick="showCity1()"/>
                                            <span class="uh"></span>
                                                 शहर
                                          </label>
                                        </div>
                                        <div class="ew ug ul">
                                          <label>
                                            <input type="radio" id="Villagei" name="CityOrVillage1" value="Village" onclick="showVillage1()" />
                                            <span class="uh"></span>
                                                गाव
                                          </label>
                                        </div>
                                    </div>
                              </div>
                              <div class="col-lg-3">
                                <div id="City1">
                                  <select id="City" name="City" onchange="loadBooth()" class="form-control select2-select" style="width:100%;">
                                    <option> शहर </option>
                                  </select>
                                </div>
                                  <div id="Village1">
                                    <select id="Village" name="Village" onchange="loadBooth()" class="form-control select2-select" style="width:100%;">
                                      <option> गाव </option>
                                    </select>
                                  </div>
                              </div>
                              <div class="col-lg-3">
                                  <select id="BoothV" name="BoothV"  class="form-control select2-select" style="width:100%;" >
                                    <option> बूथ </option>
                                  </select>
                              </div>
                              <!-- Select Ward Name -->
                              <div class="col-lg-3">
                                  <input type="text" id="WardName" name="WardName" class="form-control" placeholder="प्रभाग"></input>
                              </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-3">
                                        <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="जन्म तारीख" />
                                                <span class="input-group-addon add-on"><span class="glyphicon glyphicon-calendar"></span></span>
                                            </div>
                                        </div>

                                       <script>
                                         $(document).ready(function() {
                                         $('#datePicker')
                                         .datepicker({
                                           format: 'yyyy-mm-dd'
                                          })
                                        });
                                         // 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">
                                        <div class="bv" data-example-id="" style="margin-top:5px;">
                                           <strong> मृत ?</strong>
                                            <div class="ew ug ul">
                                              <label>
                                                <input type="radio" id="IsDeada" name="IsDead"  value="1" />
                                                <span class="uh"></span>
                                                होय
                                              </label>
                                            </div>
                                            <div class="ew ug ul">
                                              <label>
                                                <input type="radio" id="IsDeadb" name="IsDead"  value="0" checked/>
                                                <span class="uh"></span>
                                                    नाही
                                              </label>
                                            </div>
                                       </div>
                                    </div>
                                       <div class="col-lg-3">
                                        <div class="bv" data-example-id="" style="margin-top:5px;">
                                           <strong> अपंग ? </strong>
                                            <div class="ew ug ul">
                                              <label>
                                                <input type="radio" id="IsHandicappedY" name="IsHandicapped"  value="1" />
                                                <span class="uh"></span>
                                                    होय
                                              </label>
                                            </div>
                                            <div class="ew ug ul">
                                              <label>
                                                <input type="radio" id="IsHandicappedN" name="IsHandicapped"  value="0" checked />
                                                <span class="uh"></span>
                                                    नाही
                                              </label>
                                            </div>
                                       </div>
                                    </div>
                                </div>
                            </div>
                            <p/>

                            <div class="row">
                              <div class="col-lg-12">
                                <div class="col-lg-3">
                                  <input type="text" id="Cast" name="Cast" placeholder="जात" class="form-control">
                                </div>
                                <div class="col-lg-3">
                                  <input type="text" id="Age" name="Age" placeholder="वय" readonly class="form-control">
                                </div>                                
                                <div class="col-lg-3">
                                   <select id="Profession" name="Profession" 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>
                                          <option value="खाजगी नोकरी" >  खाजगी नोकरी </option> 
                                          <option value="व्यवसाय">  व्यवसाय </option> 
                                          <option value="इतर">  इतर </option>
                                      </select>
                                </div>
                              </div>
                            </div>
        </div>

        <div class="qf b aml" style="width:200%;" >
            <h4> मतदार माहिती </h4>
                   <div class="row">
                        <div class="col-lg-12">
                            <div class="col-lg-7" >
                                <input type="text" id="EPICNumber" name="VoterId" placeholder="मतदार क्र." class="form-control"></input>
                            </div>
                        </div>
                    </div>
                    <p/>
                    <div class="row"> 
                        <div class="col-lg-12">
                            <div class="col-lg-7" >
                                <div class="bv" data-example-id="" style="margin-top:5px;">
                                   <strong> मतदान केले ? &nbsp;&nbsp; :</strong>
                                    <div class="ew ug ul">
                                        <label>
                                            <input type="radio" id="VotingDoneA" name="IsVoteDone"  value="1" />
                                            <span class="uh"></span> होय </label>
                                    </div>
                                    <div class="ew ug ul">
                                        <label>
                                        <input type="radio" id="VotingDoneB" name="IsVoteDone"  value="0"/>
                                        <span class="uh"></span>
                                           नाही
                                        </label>
                                    </div>
                               </div>
                            </div> 
                        </div>
                    </div>
                    <p/>
                    <div class="row"> 
                        <div class="col-lg-12">
                            <div class="col-lg-7">
                                <div class="bv" data-example-id="" style="margin-top:5px;">
                                   <strong> राजकीयदृष्ट्या प्रभावी  &nbsp;&nbsp; :</strong>
                                    <div class="ew ug ul">
                                        <label>
                                            <input type="radio" id="IsPoliticalPersonY" name="IsPoliticalPerson" value="1" />
                                            <span class="uh"></span> होय </label>
                                    </div>
                                    <div class="ew ug ul">
                                        <label>
                                        <input type="radio" id="IsPoliticalPersonN" name="IsPoliticalPerson" value="0"/>
                                        <span class="uh"></span>
                                           नाही
                                        </label>
                                    </div>
                               </div>
                            </div>  
                        </div>
                    </div>
                    <p/>
                    <div class="row"> 
                        <div class="col-lg-12">
                            <div class="col-lg-7" >
                                <div class="bv" data-example-id="" style="margin-top:5px;">
                                   <strong> मतदाराचा अंदाज &nbsp;&nbsp; :</strong>
                                    <div class="ew ug ul">
                                        <label>
                                            <input type="radio" id="Green"  name="VotingAnalysis" value="आपला" />
                                            <span class="uh"></span> आपला 
                                        </label>
                                    </div>
                                    <div class="ew ug ul"> 
                                        <label>
                                            <input type="radio" id="Red" name="VotingAnalysis" value="विरोधी"/>
                                            <span class="uh"></span>
                                                विरोधी
                                        </label>
                                    </div>
                                    <div class="ew ug ul">
                                        <label>
                                        <input type="radio" id="Yellow" name="VotingAnalysis" value="संदिग्ध"/>
                                        <span class="uh"></span>
                                           संदिग्ध
                                        </label>
                                    </div>  
                                     <div class="ew ug ul">
                                        <label>
                                        <input type="radio" id="White" name="VotingAnalysis" value="इतर"/>
                                        <span class="uh"></span>
                                           इतर
                                        </label>
                                    </div>                           
                               </div>
                            </div> 
                        </div>
                    </div>
                  <br/>&nbsp;<p/>
                    <div class="row"> 
                      <div class="col-lg-12">
                          <button type="submit" class="cg fp"> Update </button>
                      </div>
                    </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  </form>

<script>
$(document).ready(function() {
      $("#VillageId").hide();
        $("#CityId").hide();

        $("#City1").hide();
        $("#Village1").hide();

        $("#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.votermainview', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>