<div class="tab-container">
   <form action="#" method="post" class="form-horizontal setting-delete-account-form">
      <fieldset>
         <legend><i class="fa fa-trash-o"></i> <?php echo $wo['lang']['delete_account']; ?> <?php if(Wo_IsAdmin($wo['user']['user_id']) === true) { ?><small><a href="<?php echo Wo_SeoLink('index.php?tab1=timeline&u=' . $wo['setting']['username']);?>">(<?php echo $wo['setting']['name'];?>)</a></small><?php } ?></legend>
         <div class="setting-delete-account-alert setting-update-alert"></div>
         <p><?php echo $wo['lang']['delete_account_confirm']; ?></p>
         <div class="form-group">
            <div class="col-sm-3 text-left">
               <a href="<?php echo Wo_SeoLink('index.php?tab1=home');?>">
               <i class="fa fa-arrow-circle-o-left "></i> <?php echo $wo['lang']['delete_go_back']; ?>
               </a>
            </div>
         </div>
         <div class="form-group">
            <label class="col-md-3" for="password"><?php echo $wo['lang']['current_password']; ?></label>
            <div class="col-md-6">
               <input id="password" name="password" type="password" class="form-control input-md">
            </div>
         </div>
         <div class="form-group">
            <label class="col-md-3"></label>
            <div class="col-sm-3 text-left">
               <button type="submit" name="save_setting" id="save-setting" class="form-control btn-main-color btn-main">
               <i class="fa fa-remove progress-icon" data-icon="remove"></i> <?php echo $wo['lang']['delete']; ?>
               </button>
            </div>
         </div>
      </fieldset>
   </form>
</div>
<script type="text/javascript">
$(function() {
  $('form.setting-delete-account-form').ajaxForm({
    url: Wo_Ajax_Requests_File() + '?f=delete_user_account',
    beforeSend: function() {
      Wo_progressIconLoader($('form.setting-delete-account-form').find('button'));
    },
    success: function(data) {
      if (data.status == 200) {
        $('.setting-delete-account-alert').html('<div class="alert alert-success">' + data.message + '</div>');
        $('.alert-success').fadeIn('fast', function() {
          window.setTimeout(function() {
            window.location.href = data.location;
          }, 3000);
        });
      } else {
        var errors = data.errors.join("<br>");
        $('.setting-delete-account-alert').html('<div class="alert alert-danger">' + errors + '</div>');
        $('.alert-danger').fadeIn(300);
      }
      Wo_progressIconLoader($('form.setting-delete-account-form').find('button'));
    }
  });
});
</script>