<script type="text/javascript">
	function cekpassword()
	{
		var aku = document.getElementById("new_password").value;
		var kamu = document.getElementById("new_password2").value;
		// var repassword = password;
		if (aku!=kamu)
		{
			// document.getElementById("warning").innerHTML="<div class='alert alert-danger' role='alert'>Maaf, password tidak sama. Mohon tulis ulang!</div>";
			document.getElementById("warning").innerHTML="<div class='alert alert-danger' role='alert'>Maaf, password baru tidak sama. Mohon tulis ulang!</div>";
			return false;
		}
		else
		{
			return true;
		}
	}
</script>
<div id="page-wrapper">
	<div class="main-page">
		<div class="forms">
			<div class=" form-grids row form-grids-right">
				<div class="widget-shadow " data-example-id="basic-forms"> 
					<div class="form-title">
						<h4>Ubah Pewawancara</h4>
					</div>
					<div class="form-body">
						<?php echo $this->session->flashdata('msg'); ?>
						<form class="form-horizontal" action="<?php echo base_url();?>admin/Pewawancara/pewawancaraEditExec" method="post" enctype="multipart/form-data">
							<input type="hidden" name="id_admin" value="<?php echo $pewawancara->id_admin;?>">
							<div class="form-group">
								<label class="col-sm-3 control-label">Nama</label>
								<div class="col-sm-4">
									<input type="text" name="nama_admin" class="form-control" value="<?php echo $pewawancara->nama_admin;?>" required>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">Email</label>
								<div class="col-sm-4">
									<input type="email" name="email" class="form-control" value="<?php echo $pewawancara->email;?>" required>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">Nomor HP</label>
								<div class="col-sm-4">
									<input type="text" name="no_hp" class="form-control" value="<?php echo $pewawancara->no_hp;?>" required>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">Password</label>
								<div class="col-sm-4">
									<input type="password" name="password" id="new_password" class="form-control">
									<p style="color:#FF0000;">Biarkan kosong jika tidak ingin mengubah password.</p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">Tulis Ulang Password</label>
								<div class="col-sm-4">
									<input type="password" name="repassword" id="new_password2" class="form-control" >
									<p style="color:#FF0000;">Biarkan kosong jika tidak ingin mengubah password.</p>
									<div id="warning"></div>
								</div>
							</div>
							<div class="col-sm-offset-3">
								<a href="<?php echo base_url();?>admin/Pewawancara" class="btn btn-danger"><i class="fa fa-times"></i> Batal</a>&nbsp;&nbsp;
								<button type="submit" class="btn btn-success" onclick="return cekpassword();"><i class="fa fa-save"></i> Simpan</button>
							</div>
						</form> 
					</div>
				</div>
			</div>
		</div>
	</div>
</div>