<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>Edit Profile</h4>
					</div>
					<div class="form-body">
						<?php echo $this->session->flashdata('msg'); ?>
						<form class="form-horizontal" action="<?php echo base_url();?>Admin/editProfileExec" method="post">
							<input type="hidden" name="id_admin" value="<?php echo $admin->id_admin;?>">
							<div class="form-group">
								<label class="col-sm-2 control-label">Nama<span style="color:#ff0000;">*</span></label>
								<div class="col-sm-9">
									<input type="text" name="nama" class="form-control" value="<?php echo $admin->nama;?>" 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="text" name="email" class="form-control" value="<?php echo $admin->email;?>" required>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">Nomor HP<span style="color:#ff0000;">*</span></label>
								<div class="col-sm-9">
									<input type="text" name="no_hp" class="form-control" value="<?php echo $admin->no_hp;?>" required>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">Password Baru</label>
								<div class="col-sm-9">
									<input type="password" name="password" class="form-control" id="password">
									<p class="help-block" style="color:#0000ff;">* Biarkan kosong jika Anda tidak ingin merubah password</p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">Tulis Ulang Password</label>
								<div class="col-sm-9">
									<input type="password" name="repassword" class="form-control" id="repassword">
									<p class="help-block" style="color:#0000ff;">* Biarkan kosong jika Anda tidak ingin merubah password</p>
									<div id="warning"></div>
								</div>
							</div>
							<div class="col-sm-offset-2">
								<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>