<div class="wow_content wow_sett_content">
	<div class="wo_page_hdng pag_neg_padd">
		<div class="wo_page_hdng_innr">
			<span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path fill="currentColor" d="M22.7,19L13.6,9.9C14.5,7.6 14,4.9 12.1,3C10.1,1 7.1,0.6 4.7,1.7L9,6L6,9L1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1C4.8,14 7.5,14.5 9.8,13.6L18.9,22.7C19.3,23.1 19.9,23.1 20.3,22.7L22.6,20.4C23.1,20 23.1,19.3 22.7,19Z"></path></svg></span> <?php echo $wo['lang']['general_setting'];?>
		</div>
	</div>
	<form class="setting-general-form form-horizontal" method="post">
		<div class="setting-general-alert setting-update-alert"></div>
		
		<div class="row">
			<div class="col-md-7">
				<div class="wow_form_fields">
					<label for="page_title"><?php echo $wo['lang']['page_name']; ?></label>
					<input name="page_title" id="page_title" type="text" value="<?php echo $wo['setting']['page_title']?>" autocomplete="off">
				</div>
			</div>
			<div class="col-md-5">
				<div class="wow_form_fields">
					<label for="page_category"><?php echo $wo['lang']['category'] ?></label>
					<select id="page_category" name="page_category">
						<?php 
							foreach ($wo['page_categories'] as $categories => $category) { 
							$category_id = $wo['setting']['page_category'];
							$selected_contry = ($categories == $category_id) ? ' selected' : '' ;
						?>
						<option value="<?php echo $categories;?>" <?php echo $selected_contry;?> ><?php echo $category;?></option>
						<?php } ?>
					</select>
				</div>
			</div>
		</div>
		<div class="wow_form_fields">
			<label for="page_name"><?php echo $wo['lang']['page'];?> URL</label>
			<div class="input-group">
				<span class="input-group-addon"><?php echo $wo['config']['site_url'];?>/</span>
				<input id="page_name" name="page_name" type="text" value="<?php echo $wo['setting']['page_name']?>" onkeyup="Wo_CheckPagename(this.value, <?php echo $wo['setting']['page_id'];?>);" autocomplete="off">
			</div>
			<span class="help-block checking"></span>
		</div>
		<div class="row">
			<div class="col-md-5">
				<div class="wow_form_fields">
					<label for="call_action_type"><?php echo $wo['lang']['call_to_action']; ?></label>
					<select id="call_action_type" name="call_action_type">
						<?php 
						foreach ($wo['call_action'] as $categories => $category) { 
							$category_id = $wo['setting']['call_action_type'];
							$selected_action = ($categories == $category_id) ? ' selected' : '' ;
						?>
						<option value="<?php echo $categories;?>" <?php echo $selected_action;?> ><?php echo $category;?></option>
						<?php } ?>
					</select>
				</div>
			</div>
			<div class="col-md-7">
				<div class="wow_form_fields">
					<label for="call_action_type_url"><?php echo $wo['lang']['call_to_action_target'] ?></label>
					<input name="call_action_type_url" id="call_action_type_url" type="text" value="<?php echo $wo['setting']['call_action_type_url']?>" autocomplete="off">
				</div>
			</div>
		</div>
		<?php if (Wo_IsAdmin() || Wo_IsModerator()) { ?>
			<?php
				$selected_verified_yes = ($wo['setting']['verified'] == 1)   ? ' checked' : '';
				$selected_verified_no  = ($wo['setting']['verified'] == 0)   ? ' checked' : '';
			?>
			<div class="wow_form_fields mb-0">
				<label for="verified"><?php echo $wo['lang']['verification'] ?></label>
			</div>
			<div>
				<label class="radio-inline" for="verified-0">
					<input type="radio" name="verified" id="verified-0" value="verified" <?php echo $selected_verified_yes; ?> >
					<?php echo $wo['lang']['verified']; ?>
				</label>
			</div>
			<div>
				<label class="radio-inline" for="verified-1">
					<input type="radio" name="verified" id="verified-1" value="notVerified" <?php echo $selected_verified_no; ?>>
					<?php echo $wo['lang']['not_verified']; ?>
				</label>
			</div>
		<?php } else { ?>
			<div class="wow_form_fields">
				<label><?php echo $wo['lang']['verification'];?></label>  
				<div id="verification-request">
					<?php echo Wo_GetVerificationButton($wo['setting']['page_id'],'Page'); ?>               
				</div>
			</div>
		<?php } ?>
		
        <div class="text-center">
			<button type="submit" class="btn btn-main btn-mat btn-mat-raised add_wow_loader"><?php echo $wo['lang']['save']; ?></button>
		</div>
		<input type="hidden" name="page_id" value="<?php echo $wo['setting']['page_id'];?>">
		<input type="hidden" name="hash_id" value="<?php echo Wo_CreateSession();?>">
	</form>
</div>
<script type="text/javascript">
$(function() {
  $('form.setting-general-form').ajaxForm({
    url: Wo_Ajax_Requests_File() + '?f=pages&s=update_general_settings',
    beforeSend: function() {
      $('.setting-general-form').find('.add_wow_loader').addClass('btn-loading');
    },
    success: function(data) {
      scrollToTop();
      if (data.status == 200) {
        $('.setting-general-alert').html('<div class="alert alert-success">' + data.message + '</div>');
        $('.alert-success').fadeIn('fast', function() {
           $(this).delay(2500).slideUp(500, function() {
              $(this).remove();
            });
        });
      } else {
          var errors = data.errors.join("<br>");
          $('.setting-general-alert').html('<div class="alert alert-danger">' + errors + '</div>');
          $('.alert-danger').fadeIn(300);
      }
      $('.setting-general-form').find('.add_wow_loader').removeClass('btn-loading');
    }
  });
});
</script>