<!DOCTYPE html>
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="<?php echo base_url();?>/favicon.ico" type="image/x-icon">
<link rel="icon" href="<?php echo base_url();?>/favicon.ico" type="image/x-icon">

<title><?php echo SITE_TITLE;?>: Upgrade Certificate</title>
<?php  $this->session = \Config\Services::session(); ?>
<!-- Stylesheets -->
<link rel="stylesheet" href="<?php echo base_url();?>/assets/css/jquery-ui.css"/>
<link rel="stylesheet" href="<?php echo base_url();?>/assets/css/tmis.css"/>
<link rel="stylesheet" href="<?php echo base_url();?>/assets/css/tmis.desktop.css" media="(min-width:901px)" />
<link rel="stylesheet" href="<?php echo base_url();?>/assets/css/tmis.tablet.css" media="(min-width:791px) and (max-width: 900px)" />
<link rel="stylesheet" href="<?php echo base_url();?>/assets/css/tmis.mobile.css" media="(max-width:790px)" />
<link rel="stylesheet" href="<?php echo base_url();?>/assets/css/tmis.list.css"/>
<link rel="stylesheet" href="<?php echo base_url();?>/assets/css/tmis.menu.css"/>

<!-- Javascript -->
<?php echo minify_js('register-upgrade_certificate', array('jquery-2.1.1.min.js', 'jquery-ui.js', 'jquery.form.js', 'tmis.js','tmis.callout.js','tmis.fileform.js','tmis.menu.js', 'tmis.responsive.js'));?>
</head>

<body style="margin:0px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <?php echo view("addons/secure_header");?>
  <tr>
    <td valign="top" colspan="2" style="padding-top:0px;padding-left:15px;">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td id="menucontainer"><?php echo view("addons/menu");?></td>
        <td class="bodyspace" style="padding-left:15px;padding-top:15px; vertical-align:top;">


    <form id="certificate_upgrade_form" method="post" autocomplete="off" action="<?php echo base_url();?>/Profile/upgrade_certificate" class='simplevalidator'>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
        <td class="h1 grey">Apply for Certificate Upgrade</td>
        </tr>
     
     <?php
     echo !empty($msg)?"<tr><td>".format_notice($this, $msg)."</td></tr>": "";
     $msg = "";
     ?>
     
     <tr><td class="greybg h3"  style="padding:5px; padding-left:10px;">Education:</td></tr>
     <?php if (empty($preview)) {?>
     <tr>
      <td><div id="form_div__education" class='ignorearea'><?php echo view('addons/basic_addons', array('area'=>'education_form'));?></div></td>
     </tr>
     <?php }?>
     
     <tr><td><div id="institution_list">
     <?php
     if ($this->session->get('education_list')) {
         echo view('addons/basic_addons', array('area'=>'education_list', 'mode'=>(!empty($preview)? 'preview': '') ));
     } else {
         ?>
     <table border="0" cellspacing="0" cellpadding="0" class="resultslisttable">
     <tr><td>Current List</td></tr>
     <tr><td>No education added yet.</td></tr>
     </table>
     <?php
     }?>
     </div></td></tr>
     <tr><td>&nbsp;</td></tr>         
     
     <tr><td class="greybg h3"  style="padding:5px; padding-left:10px;">Qualification Documents:</td></tr>
     
     <?php if (empty($preview)) {?>
     <tr>
       <td><div id="form_div__document" class='ignorearea'><?php echo view('addons/basic_addons', array('area'=>'document_form'));?></div></td>
       </tr>
     <?php }?>
     
     <tr><td><div id="document_list">
     <?php
     if ($this->session->get('document_list')) {
         echo view('addons/basic_addons', array('area'=>'document_list', 'mode'=>(!empty($preview)? 'preview': '') ));
     } else {
         ?>
     <table border="0" cellspacing="0" cellpadding="0" class="resultslisttable">
     <tr><td>Current List</td></tr>
     <tr><td>No document added yet.</td></tr>
     </table>
     <?php
     }?>
     </div></td></tr>
     <tr><td>&nbsp;</td></tr>
     
     <?php if (!(!empty($action) && $action=='view')) {?>    
        <tr><td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class='buttonnav'>
            <tr>
            <td><?php if (empty($id) && empty($upgrading_teacher)) {?><button type="button" name="canceladd" id="canceladd" class="greybtn" onclick="location.href='<?php echo base_url().'/Teacher/cancel/action/view';?>'">CANCEL</button><?php }?></td>
            <td class='spacefiller'>&nbsp;</td>
            <?php if (!empty($preview)) {?>
            <td><button type="button" name="edit" id="edit" class="btn" onclick="location.href='<?php echo base_url().'/'.(!empty($upgrading_teacher)? 'Profile/upgrade_certificate/edit/Y': 'Teacher/add/edit/Y'.(!empty($id)? '/id/'.$id: ''));?>'">EDIT</button></td>
            <td><?php echo !empty($id)? "<input type='hidden' id='userid' name='userid' value='".$id."'/>": ''; ?><input type="submit" name="upgrade" id="upgrade" value="APPLY" class="btn" /></td>
            <?php } else { ?>
            <td>&nbsp;</td>
            <td><input type="submit" name="preview" id="preview" value="PREVIEW" class="btn" /></td>
            
            <?php } ?>
            </tr>
            </table></td></tr> 
    <?php } ?> 



    </table>

</form>
            
            </td></tr>
        </table>
 
      
        </td>
      </tr>
      <?php echo view("addons/secure_footer");?>
     </table>  
</body>
</html>
