<div class="page-margin mt-0">
	<div class="wow_content popular_posts_hdr">
		<h2><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-trash-2"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>&nbsp;<?php echo $wo['lang']['delete_page'];?></h2>
	</div>
</div>

<div class="wo_settings_page wow_content">
	<form action="#" method="post" class="form-horizontal setting-delete-page-form" autocomplete="off">
		<div class="setting-delete-page-alert setting-update-alert"></div>
		
		<div class="wow_form_fields">
			<label for="password"><?php echo $wo['lang']['password']; ?></label>
			<input id="password" name="password" type="password">
		</div>
		<input type="hidden" name="page_id" value="<?php echo $wo['setting']['page_id'];?>">
		<div class="text-center">
			<button type="submit" class="btn btn-main btn-mat btn-mat-raised add_wow_loader"><?php echo $wo['lang']['delete']; ?></button>
		</div>
		<input type="hidden" name="hash_id" value="<?php echo Wo_CreateSession();?>">
	</form>
</div>

<script type="text/javascript">
$(function() {
  $('form.setting-delete-page-form').ajaxForm({
    url: Wo_Ajax_Requests_File() + '?f=pages&s=delete_page',
    beforeSend: function() {
      $('.setting-delete-page-form').find('.add_wow_loader').addClass('btn-loading');
    },
    success: function(data) {
      if (data.status == 200) {
        $('.setting-delete-page-alert').html('<br><div class="alert alert-success">' + data.message + '</div>');
        $('.alert-success').fadeIn('fast', function() {
          window.setTimeout(function() {
            window.location.href = data.location;
          },2000);
        });
      } else {
        var errors = data.errors.join("<br>");
        $('.setting-delete-page-alert').html('<br><div class="alert alert-danger">' + errors + '</div>');
        $('.alert-danger').fadeIn(300);
      }
      $('.setting-delete-page-form').find('.add_wow_loader').removeClass('btn-loading');
    }
  });
});
</script>