@extends('layouts.dashboard')

@section('content')

<!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
	  <div class="container-full">
		<!-- Content Header (Page header) -->
		<div class="content-header">
			<div class="d-flex align-items-center">
				<div class="me-auto">
					<h3 class="page-title">Create Student</h3>
					<div class="d-inline-block align-items-center">
						<nav>
							<ol class="breadcrumb">
								<li class="breadcrumb-item"><a href="{{ route('admin.index') }}"><i class="mdi mdi-home-outline"></i></a></li>
								<li class="breadcrumb-item" aria-current="page">Student</li>
								<li class="breadcrumb-item active" aria-current="page">Create</li>
							</ol>
						</nav>
					</div>
				</div>
				
			</div>
		</div>	  

		<!-- Main content -->
		<section class="content">
			<div class="row">			  
				
				<div class="col-lg-12 col-12">
					
					@if ($errors->any())
                        <div class="alert alert-danger">
                            <strong>Whoops!</strong> There were some problems with your input.<br><br>
                            <ul>
                                @foreach ($errors->all() as $error)
                                    <li>{{ $error }}</li>
                                @endforeach
                            </ul>
                        </div>
                    @endif
                    

                    <!-- New Role Start 95 - kesavan -->
					  <div class="box">
						<!-- /.box-header -->
						<form class="form" action="{{ route('admin.student.store') }}" method="post">
							@csrf
							<div class="box-body">
								<div class="row">
									<div class="col-md-6">
										<div class="col-md-12">
											<div class="form-group">
												<label class="form-label">Name</label>
												<div class="input-group mb-3">
													<input type="text" class="form-control @error('name') is-invalid @enderror" name="name" placeholder="Name" value="{{ old('name') }}" required>
												</div>
												@error('name')
				                                    <span class="invalid-feedback" role="alert">
				                                        <strong>{{ $message }}</strong>
				                                    </span>
				                                @enderror
											</div>
										</div>
										<div class="col-md-12">
										    <div class="form-group">
												<label class="form-label">Email address</label>
												<div class="input-group mb-3">
													<input type="email" class="form-control @error('email') is-invalid @enderror" name="email" placeholder="Email" value="{{ old('email') }}" required>
												</div>
												@error('email')
				                                    <span class="invalid-feedback" role="alert">
				                                        <strong>{{ $message }}</strong>
				                                    </span>
				                                @enderror
											</div>
										</div>
										<div class="col-md-12">
											<div class="form-group">
												<label class="form-label">Phone Number</label>
												<div class="input-group mb-3">
													<input type="text" class="form-control @error('phone') is-invalid @enderror" name="phone" placeholder="Phone Number" value="{{ old('phone') }}" required>
												</div>
												@error('phone')
				                                    <span class="invalid-feedback" role="alert">
				                                        <strong>{{ $message }}</strong>
				                                    </span>
				                                @enderror
											</div>
										</div>
										<div class="col-md-12">
											<div class="form-group">
												<label class="form-label">Student ID</label>
												<div class="input-group mb-3">
													<input type="text" class="form-control @error('student_id') is-invalid @enderror" name="student_id" placeholder="Student ID">
												</div>
												@error('student_id')
				                                    <span class="invalid-feedback" role="alert">
				                                        <strong>{{ $message }}</strong>
				                                    </span>
				                                @enderror
											</div>
										</div>
										<div class="col-md-12">
											<div class="form-group">
												<label class="form-label">Gender</label>
												<div class="input-group mb-3">
													<select class="form-control @error('gender') is-invalid @enderror" name="gender">
														<option value="Male">Male</option>
														<option value="Female">Female</option>
													</select>
												</div>
												@error('gender')
				                                    <span class="invalid-feedback" role="alert">
				                                        <strong>{{ $message }}</strong>
				                                    </span>
				                                @enderror
											</div>
										</div>
									</div>
									<div class="col-md-6">
										<div class="col-md-12">
											<div class="form-group">
												<label class="form-label">Father Name</label>
												<div class="input-group mb-3">
													<input type="text" class="form-control @error('father_name') is-invalid @enderror" name="father_name" placeholder="Father Name" value="{{ old('father_name') }}" required>
												</div>
												@error('father_name')
				                                    <span class="invalid-feedback" role="alert">
				                                        <strong>{{ $message }}</strong>
				                                    </span>
				                                @enderror
											</div>
										</div>
										<div class="col-md-12">
										    <div class="form-group">
												<label class="form-label">Mother Name</label>
												<div class="input-group mb-3">
													<input type="text" class="form-control @error('mother_name') is-invalid @enderror" name="mother_name" placeholder="Mother Name" value="{{ old('mother_name') }}" required>
												</div>
												@error('mother_name')
				                                    <span class="invalid-feedback" role="alert">
				                                        <strong>{{ $message }}</strong>
				                                    </span>
				                                @enderror
											</div>
										</div>
										<div class="col-md-12">
											<div class="form-group">
												<label class="form-label">Date of Birth</label>
												<div class="input-group mb-3">
													<input type="date" onfocus="'showPicker' in this && this.showPicker()" class="form-control @error('join_date') is-invalid @enderror" name="join_date" placeholder="Salary" value="{{ old('join_date') }}" required>
												</div>
												@error('join_date')
				                                    <span class="invalid-feedback" role="alert">
				                                        <strong>{{ $message }}</strong>
				                                    </span>
				                                @enderror
											</div>
										</div>
										<div class="col-md-12">
											<div class="form-group">
												<label class="form-label">Password</label>
												<div class="input-group mb-3">
													<input type="password" class="form-control @error('password') is-invalid @enderror" name="password" placeholder="Password">
												</div>
												@error('password')
				                                    <span class="invalid-feedback" role="alert">
				                                        <strong>{{ $message }}</strong>
				                                    </span>
				                                @enderror
											</div>
										</div>
										<div class="col-md-12">
											<div class="form-group">
												<label class="form-label">Status</label>
												<div class="input-group mb-3">
													<select class="form-control @error('status') is-invalid @enderror" name="status">
														<option value="active">Active</option>
														<option value="inactive">In Active</option>
													</select>
												</div>
												@error('status')
				                                    <span class="invalid-feedback" role="alert">
				                                        <strong>{{ $message }}</strong>
				                                    </span>
				                                @enderror
											</div>
										</div>
									</div>
								</div>
							</div>
							<!-- /.box-body -->
							<div class="box-footer text-end">
								<input type="submit" name="submit" class="btn btn-primary" value="Submit">
								<!-- <button type="submit" class="btn btn-primary">
								  <i class="ti-save-alt"></i> Save
								</button> -->
							</div>  
						</form>
					  </div>
					  <!-- /.box -->			
				</div>

		    </div>
			
		  </div>
		  <!-- /.row -->

		</section>
		<!-- /.content -->
	  </div>
  </div>
  <!-- /.content-wrapper -->

@endsection