<!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;?>: Register</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.mobile.css" media="(max-width:790px)" />
		<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.desktop.css" media="(min-width:901px)" />
		<link rel="stylesheet" href="<?php echo base_url();?>/assets/css/tmis.list.css" />
		<!-- Javascript -->
		<script>
		var sessionValue = "<?php echo $this->session->get('emp_school');?>";
		var ippsValue = "<?php echo $this->session->get('ipps');?>";
		</script>
		<?php echo minify_js('register-step_two', array('jquery-2.1.1.min.js', 'jquery-ui.js', 'jquery.form.js', 'tmis.js', 'tmis.callout.js', 'tmis.fileform.js', 'tmis.responsive.js'));?>
</head>

<body style="margin:0px;">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<?php echo view("addons/public_header", array("page"=>"register"));?>
			<tr>
				<td valign="top" colspan="2" class="bodyspace">
					<form id="home_registration_form" method="post" autocomplete="off" action="<?php echo base_url();?>/Register/step_two" class='simplevalidator'>
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td style="text-align:center;">
									<div class="card-inner vregform" style="display:inline-block;">
										<table border="0" cellspacing="0" cellpadding="10" width="100%" class="registercss">
											<tr>
												<td colspan="2" class="h1 black">Registration (Step 2 of 4)</td>
											</tr>
											<?php echo !empty($msg)?"<tr><td colspan='2'>".format_notice($this, $msg)."</td></tr>": "";?>
												<tr>
													<td class="label<?php echo !$this->session->get('edit_step_2')? " addinfo ": " ";?>">Confirmation Code:</td>
													<td>
														<?php if ($this->session->get('edit_step_2')) {
                                        echo "<span class='value'>".$this->session->get('verificationcode')."</span><input type='hidden' id='verificationcode' name='verificationcode' value='".$this->session->get('verificationcode')."'/>";
                                    } else {?>
															<input type="text" id="verificationcode" name="verificationcode" title="Confirmation Code" class="textfield" value="<?php echo($this->session->get('verificationcode')? $this->session->get('verificationcode'): '');?>" />
															<br><span class="smalltext">Check your email for code.</span>
															<?php }?>
													</td>
												</tr>
												<tr>
													<td class="label">Teacher UTS Number:</td>
													<td>
														<input type="text" id="teacherid" name="teacherid" title="Teacher UTS Number" class="textfield optional" placeholder="Optional" value="<?php echo($this->session->get('teacherid')? $this->session->get('teacherid'): '');?>" />
													</td>
												</tr>
												<tr>
													<td class="label">Teaching Qualification:</td>
													<td>
														<input type="text" id="teacherQualCat" name="teacherQualCat" title="Teaching Qualification" class="textfield selectfield" placeholder="Select" value="<?php echo($this->session->get('teacherQualCat')? $this->session->get('teacherQualCat'): '');?>" />
													</td>
												</tr>
												<tr>
													<td class="label">Religion:</td>
													<td>
														<input type="text" id="religion" name="religion" title="Religion" class="textfield selectfield editable" placeholder="Select" value="<?php echo($this->session->get('religion')? $this->session->get('religion'): '');?>" />
													</td>
												</tr>
												<tr>
													<td class="label">Permanent Address:</td>
													<td>
														<input type="text" id="permanentaddress" name="permanentaddress" title="Permanent Address" class="textfield placefield" value="<?php echo($this->session->get('permanentaddress')? $this->session->get('permanentaddress'): '');?>" />
													</td>
												</tr>
												<tr>
													<td class="label">Contact Address:</td>
													<td>
														<div class="nextdiv">
															<input type="text" id="contactaddress" name="contactaddress" title="Contact Address" class="textfield placefield" value="<?php echo($this->session->get('contactaddress')? $this->session->get('contactaddress'): '');?>" />
														</div>
														<div class="nextdiv">
															<input type="checkbox" id="permanentsameascontact" name="permanentsameascontact" value="Y" />
															<label for="permanentsameascontact">Same as above</label>
														</div>
													</td>
												</tr>
												<tr>
													<td class="label">Country of Citizenship:</td>
													<td>
														<div class="nextdiv">
															<input type="text" id="citizenship__country" name="citizenship__country" title="Country of Citizenship" placeholder="Select Country" class="textfield selectfield" value="<?php echo($this->session->get('citizenship__country')? $this->session->get('citizenship__country'): '');?>" />
														</div>
														<div class="nextdiv">
															<input type="text" id="citizenship__citizentype" name="citizenship__citizentype" title="How You Obtained Citizenship" placeholder="Citizen By" class="textfield selectfield" value="<?php echo($this->session->get('citizenship__citizentype') && $this->session->get('citizenship__citizentype') != '_CITIZENSHIP_TYPE_'? $this->session->get('citizenship__citizentype'): '');?>" />
														</div>
													</td>
												</tr>
												<?php if(empty($this->session->get('emp_school'))){ ?>
													<tr>
														<td class="label">Employment Status:</td>
														<td>
															<div class="nextdiv">
																<input type="checkbox" id="teacheremployed" name="teacheremployed" value="Y" />
																<label for="teacheremployed">I am currently employed.</label>
															</div>
														</td>
													</tr>
													<?php } ?>
														<tr id="curr">
															<td colspan="2" class="greybg h3">Current Employment</td>
														</tr>
														<tr>
															<td colspan="2" class="">
																<table border="0" cellspacing="0" cellpadding="10" id="emp">
																	<tr>
																		<td class="label">School:</td>
																		<td>
																			<input type="text" id="emp_school" name="emp_school" title="School" class="textfield optional" value="<?php echo($this->session->get('emp_school')? $this->session->get('emp_school'): '');?>" />
																		</td>
																	</tr>
																	<tr>
																		<td class="label">Title:</td>
																		<td>
																			<input type="text" id="title" name="title" title="Title" class="textfield selectfield editable optional" value="<?php echo($this->session->get('title')? $this->session->get('title'): '');?>" />
																		</td>
																	</tr>
																	<!-- <tr>
																		<td class="label">EMIS Number:</td>
																		<td>
																			<input type="text" id="emis" name="emis" title="Educational Management Information System Number" class="textfield optional" placeholder="e.g. 1A111022 OR 111022" maxlength="8" value="<?php #echo($this->session->get('emis')? $this->session->get('emis'): '');?>" />
																		</td>
																	</tr> -->
																	<tr>
																		<td class="label">Employment Category:</td>
																		<td>
																			<input type="text" id="employmentCat" name="employmentCat" title="Employment Category" class="textfield selectfield optional" placeholder="Select Category" value="<?php echo($this->session->get('employmentCat')? $this->session->get('employmentCat'): '');?>" />
																		</td>
																	</tr>
																	<tr id="Ipps">
																		<td class="label">IPPS Number:</td>
																		<td>
																			<input type="text" id="ipps" name="ipps" maxlength="14" title="Integrated Personnel and Payroll System (IPPS)  Number" class="textfield optional numbersonly" value="<?php echo($this->session->get('ipps')? $this->session->get('ipps'): '');?>" />
																		</td>
																	</tr>
																	<tr>
																		<td class="label">Region:</td>
																		<td>
																			<input type="text" id="region" name="region" title="Region" class="textfield selectfield optional" placeholder="Select Region" value="<?php echo($this->session->get('region')? $this->session->get('region'): '');?>" />
																		</td>
																	</tr>
																	<tr>
																		<td class="label">District:</td>
																		<td>
																			<input type="text" id="emp_district" name="emp_district" title="District" class="textfield selectfield searchable editable optional" placeholder="Select District" value="<?php echo($this->session->get('emp_district')? $this->session->get('emp_district'): '');?>" />
																		</td>
																	</tr>
																	<tr>
																		<td class="label">Subcounty:</td>
																		<td>
																			<input type="text" id="emp_subCounty" name="emp_subCounty" title="Subcounty" class="textfield optional" value="<?php echo($this->session->get('emp_subCounty')? $this->session->get('emp_subCounty'): '');?>" />
																		</td>
																	</tr>
																</table>
															</td>
														</tr>
														<tr>
															<td colspan="2" class="">
																<table width="100%" border="0" cellspacing="0" cellpadding="0" class='buttonnav'>
																	<tr>
																		<td>
																			<button type="button" name="backtostep1" id="backtostep1" class="greybtn back">BACK</button>
																		</td>
																		<td class='spacefiller'>&nbsp;</td>
																		<td>
																			<?php if ($this->session->get('just_preview_2')) {
                                                echo "<button type='button' name='step2preview' id='step2preview' class='greybtn'>SAVE &amp; PREVIEW</button>";
                                            } else { ?>
																				<button type="button" name="step2save" id="step2save" class="greybtn">SAVE &amp; EXIT</button>
																				<?php  } ?>
																		</td>
																		<td>
																			<input type="submit" name="step2" id="step2" class="btn next" value="NEXT" />
																		</td>
																	</tr>
																	<tr>
																		<td colspan="4" class='note'>Applications not completed within 14 days will be automatically deleted by the system.</td>
																	</tr>
																</table>
															</td>
														</tr>
										</table>
									</div>
								</td>
						</table>
					</form>
				</td>
				</tr>
				<?php echo view("addons/public_footer");?>
	</table>
</body>
</html>