<div class="border-bottom wo_job_experience wo_job_certificate certification certification_<?php echo $wo['certification']->id ?>">
	<div class="wo_job_experience_info">
		<h4 class="title"><?php echo $wo['certification']->name ?></h4>
		<p class="sub-title">
			<span class="bold"><?php echo $wo['lang']['issuing_organization']; ?></span>: <?php echo $wo['certification']->issuing_organization; ?>
		</p>
		<p class="sub-title">
			<span class="bold"><?php echo $wo['lang']['issue_date']; ?></span>: <?php echo $wo['certification']->certification_start; ?>
			<?php if (!empty($wo['certification']->certification_end) && strpos($wo['certification']->certification_end, 00) != 0) { ?>
				&nbsp;– &nbsp;<span class="bold"><?php echo $wo['lang']['expiration_date']; ?></span>: <?php echo $wo['certification']->certification_end; ?>
			<?php } ?>
		</p>
		<?php if (!empty($wo['certification']->credential_url)) { ?>
			<p class="sub-title">
				<span class="bold"><?php echo $wo['lang']['credential_url']; ?></span>: <a href="<?php echo $wo['certification']->credential_url; ?>"><?php echo $wo['certification']->credential_url; ?></a>
			</p>
		<?php } ?>
		<?php if (!empty($wo['certification']->credential_id)) { ?>
			<p class="sub-title">
				<span class="bold"><?php echo $wo['lang']['credential_id']; ?></span>: <?php echo $wo['certification']->credential_id; ?>
			</p>
		<?php } ?>
		<?php if (!empty($wo['certification']->pdf)) { ?>
			<!--<p><a class="btn btn-sm btn-main btn-mat" href="<?php echo($wo['config']['site_url'].'/requests.php?f=certification&s=download_user_certification&id='.$wo['certification']->id.'&mode_type=linkedin'); ?>"><?php echo $wo['lang']['download']; ?> <?php echo $wo['lang']['certification_file']; ?></a></p>-->
		<?php } ?>
		<p>
			<button class="btn btn-danger btn-mat certification_btn" onclick="DeleteCertification('<?php echo $wo['certification']->id ?>','hide')"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path fill="currentColor" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg> <?php echo $wo['lang']['delete'] ?></button>
			<button class="btn btn-success btn-mat certification_btn" onclick="EditCertification('<?php echo $wo['certification']->id ?>')"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path fill="currentColor" d="M8,12H16V14H8V12M10,20H6V4H13V9H18V12.1L20,10.1V8L14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H10V20M8,18H12.1L13,17.1V16H8V18M20.2,13C20.3,13 20.5,13.1 20.6,13.2L21.9,14.5C22.1,14.7 22.1,15.1 21.9,15.3L20.9,16.3L18.8,14.2L19.8,13.2C19.9,13.1 20,13 20.2,13M20.2,16.9L14.1,23H12V20.9L18.1,14.8L20.2,16.9Z"></path></svg> <?php echo $wo['lang']['edit'] ?></button>
		</p>
	</div>
</div>


<div class="modal fade" id="edit_certification_modal_<?php echo $wo['certification']->id ?>" role="dialog" data-keyboard="false" style="overflow-y: auto;">
  <div class="modal-dialog wow_mat_mdl">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"><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-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></span></button>
        <h4 class="modal-title"><?php echo $wo['lang']['edit_certification'] ?></h4>
      </div>
      <form class="form form-horizontal edit_certification_form_<?php echo $wo['certification']->id ?>" method="post" action="#">
        <div class="modal-body twocheckout_modal">
          <div class="modal_edit_certification_modal_alert_<?php echo $wo['certification']->id ?>"></div>
          <div class="clear"></div>
          <div class="col-lg-6">
          	<div class="wow_form_fields">
	          	<label><?php echo $wo['lang']['name']; ?></label>  
	            <input name="name" type="text" autocomplete="off" value="<?php echo $wo['certification']->name ?>">
	          </div>
          </div>
          <div class="col-lg-6">
          	<div class="wow_form_fields">
	          	<label><?php echo $wo['lang']['issuing_organization']; ?></label> 
	            <input name="issuing_organization" type="text" autocomplete="off" value="<?php echo $wo['certification']->issuing_organization ?>">
	          </div>
          </div>
          <div class="col-lg-6">
          	<div class="wow_form_fields">
	          	<label><?php echo $wo['lang']['credential_id']; ?></label>  
	            <input name="credential_id" type="text" autocomplete="off" value="<?php echo $wo['certification']->credential_id ?>">
	          </div>
          </div>
          <div class="col-lg-6">
          	<div class="wow_form_fields">
	          	<label><?php echo $wo['lang']['credential_url']; ?></label>
	            <input name="credential_url" type="text" autocomplete="off" value="<?php echo $wo['certification']->credential_url ?>">
	          </div>
          </div>

          <div class="col-lg-6">
          	<div class="wow_form_fields">
	            <label><?php echo $wo['lang']['issue_date']; ?></label>
	            <input type="text" class="edit_certification_start_<?php echo $wo['certification']->id ?>" name="certification_start" value="<?php echo $wo['certification']->certification_start ?>" autocomplete="off">
	          </div>
          </div>
          <div class="col-lg-6">
          	<div class="wow_form_fields">
	            <label><?php echo $wo['lang']['expiration_date']; ?>:</label>  
	            <input type="text" class="edit_certification_end_<?php echo $wo['certification']->id ?>" name="certification_end" value="<?php echo $wo['certification']->certification_end ?>" autocomplete="off">
	          </div>
          </div>
          <div class="col-lg-6">
            <div class="wow_form_fields">
              <label><?php echo $wo['lang']['pdf_file']; ?>: <?php echo(!empty($wo['certification']->filename) ? $wo['certification']->filename : '') ?></label>  
              <input type="file" class="certification_pdf" name="pdf" autocomplete="off" accept="application/pdf">
            </div>
          </div>
          <div class="clear"></div>
        </div>
        <div class="clear"></div>
        <input type="hidden" name="id" class="hidden" value="<?php echo $wo['certification']->id ?>">
        <div class="modal-footer">
          <div class="ball-pulse"><div></div><div></div><div></div></div>
          <button type="submit" class="btn btn-main btn-mat"><?php echo $wo['lang']['edit']; ?></button>
        </div>
      </form>
    </div>
  </div>
</div>
<script type="text/javascript">
	$(document).ready(function() { 
	    var options = { 
	    	url: Wo_Ajax_Requests_File() + '?f=certification&s=edit&hash=' + $('.main_session').val() + "&mode_type=linkedin",
	        beforeSubmit:  function () {
	        	$('.modal_edit_certification_modal_alert_<?php echo $wo['certification']->id ?>').empty();
	        	$("#edit_certification_modal_<?php echo $wo['certification']->id ?>").find('.btn-mat').attr('disabled', 'true');
	        	$("#edit_certification_modal_<?php echo $wo['certification']->id ?>").find('.btn-mat').text("<?php echo($wo['lang']['please_wait']) ?>");
	        }, 
	        success: function (data) {
	        	$("#edit_certification_modal_<?php echo $wo['certification']->id ?>").find('.btn-mat').removeAttr('disabled')
	        	$("#edit_certification_modal_<?php echo $wo['certification']->id ?>").find('.btn-mat').text("<?php echo($wo['lang']['edit']) ?>");
	        	if (data.status == 200) {
	        		$('.modal_edit_certification_modal_alert_<?php echo $wo['certification']->id ?>').html('<div class="alert alert-success bg-success"><i class="fa fa-check"></i> '+
		            data.message
		            +'</div>');
		            setTimeout(function (){
		            	location.reload();
		            }, 3000)
	        	} else {
	        		$('.modal_edit_certification_modal_alert_<?php echo $wo['certification']->id ?>').html('<div class="alert alert-danger bg-danger"> '+
	            data.message
	            +'</div>');
	        	} 
	        }
	    }; 
	    $('.edit_certification_form_<?php echo $wo['certification']->id ?>').ajaxForm(options); 
	});
</script>