<script type="text/javascript">
	function cekpassword()
	{
		var aku = document.getElementById("password").value;
		var kamu = document.getElementById("repassword").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 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>Tambah Pegawai</h4>
					</div>
					<div class="form-body">
						<?php echo $this->session->flashdata('msg'); ?>
						<form class="form-horizontal" action="<?php echo base_url();?>Admin/pegawaiAddExec" method="post">
							<div class="form-group">
								<label class="col-sm-2 control-label">Nama Pegawai<span style="color:#ff0000;">*</span></label>
								<div class="col-sm-9">
									<input type="text" name="nama" class="form-control" required>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">Email<span style="color:#ff0000;">*</span></label>
								<div class="col-sm-9">
									<input type="email" name="email" class="form-control" required>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">Password<span style="color:#ff0000;">*</span></label>
								<div class="col-sm-9">
									<input type="password" name="password" id="password" class="form-control" required>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">Tulis Ulang Password<span style="color:#ff0000;">*</span></label>
								<div class="col-sm-9">
									<input type="password" name="repassword" id="repassword" class="form-control" required>
									<div id="warning"></div>
								</div>
							</div>
							<div class="col-sm-offset-9">
								<a href="<?php echo base_url();?>Admin" class="btn btn-danger">
									<i class="fa fa-times"></i> Batal
								</a>
								<button type="submit" class="btn btn-success" onclick="return cekpassword();"><i class="fa fa-plus"></i> Tambah</button>
							</div>
						</form> 
					</div>
				</div>
			</div>
		</div>
	</div>
</div>