<div class="tab-container">
   <form class="form-horizontal setting-change-password-form" method="post">
      <fieldset>
         <!-- Form Name -->
         <legend>
            <i class="fa fa-key"></i> <?php echo $wo['lang']['change_password']; ?> <?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-password-alert setting-update-alert"></div>
         <?php if ($wo['setting']['user_id'] == $wo['user']['user_id']) { ?>
         <!-- Password input-->
         <div class="form-group">
            <label class="col-md-3" for="current_password"><?php echo $wo['lang']['current_password']; ?></label>
            <div class="col-md-6">
               <input id="current_password" name="current_password" type="password" class="form-control input-md">
            </div>
         </div>
         <?php } ?>
         <!-- Password input-->
         <div class="form-group">
            <label class="col-md-3" for="new_password"><?php echo $wo['lang']['new_password']; ?></label>
            <div class="col-md-6">
               <input id="new_password" name="new_password" type="password" class="form-control input-md">
            </div>
         </div>
         <!-- Password input-->
         <div class="form-group">
            <label class="col-md-3" for="repeat_new_password"><?php echo $wo['lang']['repeat_password']; ?></label>
            <div class="col-md-6">
               <input id="repeat_new_password" name="repeat_new_password" type="password" class="form-control input-md">
            </div>
         </div>
         <div class="form-group">
            <label class="col-md-3"></label>
            <div class="col-sm-4 text-left">
               <button type="submit" name="save_setting" id="save-setting" value="Save" class="form-control btn-main-color btn-main">
               <i class="fa fa-floppy-o progress-icon" data-icon="floppy-o"></i> Save</button>
            </div>
            <input type="hidden" name="user_id" value="<?php echo $wo['setting']['user_id'];?>">
         </div>
      </fieldset>
   </form>
</div>
<script type="text/javascript">
$(function() {
  $('form.setting-change-password-form').ajaxForm({
    url: Wo_Ajax_Requests_File() + '?f=update_user_password',
    beforeSend: function() {
      Wo_progressIconLoader($('form.setting-change-password-form').find('button'));
    },
    success: function(data) {
      if (data.status == 200) {
        $('.setting-password-alert').html('<div class="alert alert-success">' + data.message + '</div>');
        $('.alert-success').fadeIn('fast', function() {
          $(this).delay(2500).slideUp(500, function() {
              $(this).remove();
          });
        });
        $('form.setting-change-password-form').clearForm();
      } else if (data.errors) {
        var errors = data.errors.join("<br>");
        $('.setting-password-alert').html('<div class="alert alert-danger">' + errors + '</div>');
        $('.alert-danger').fadeIn(300);
      }
      Wo_progressIconLoader($('form.setting-change-password-form').find('button'));
    }
  });
});
</script>