@extends('backend.header')
@section('index-content')

				<section role="main" class="content-body">
					<header class="page-header">
						<div class="row px-4">
							<div class="col-lg-5 pl-0">
								<h2>Mandal Form</h2>	
							</div>
						
							<div class="col-lg-5">
								<ol class="breadcrumbs">
									<li>
										<a href="{{url('index')}}">
											<i class="fa fa-home"></i>
										</a>
									</li>
									<li>
										<a href="{{url('/taluka/create')}}" class="active text-decoration-none"><span class="active">{{$area_edit[0]->menu_name_parent}}</span>
											
										</a>
									</li>
									<li>
										<span class="active">{{$area_edit[0]->menu_name_child}}</span>
										</a>
									</li>
								</ol>
							</div>
							<div class="col-lg-2">
								<div class="back-btn-div">
									<button class="btn btn-primary back-btn" onclick="window.history.back()">Back</button>
								</div>
							</div>
						</div>
					</header>
					<!-- <header class="page-header">
						<h2>Mandal Form</h2>
					</header>
					<div class="row">
						<div class="col-xs-12">
							<div class="">
								<ol class="breadcrumbs">
									<li>
										<a href="{{url('index')}}">
											<i class="fa fa-home"></i>
										</a>
									</li>
									<li>
								<a href="{{url('/taluka/create')}}" class="active text-decoration-none"><span class="active">{{$area_edit[0]->menu_name_parent}}</span>
									
								</a>
							</li>

									<li>
								<span class="active">{{$area_edit[0]->menu_name_child}}</span>
									
								</a></li>
								</ol>
							</div>
						</div>
					</div> -->

					<!-- start: page -->
					<div class="row">
						<div class="col-md-12">
							<form id="form" action="{{route('taluka.update',$area_edit[0]->pid)}}" class="form-horizontal" method="post">
							@method('PATCH')
							@csrf
								<section class="panel mt-2">
									<header class="panel-heading">
										<h4 class="my-0">Mandal Form Edit</h4>
										<!-- <div class="back-btn-div">
											<button class="btn btn-primary back-btn" onclick="window.history.back()">Back</button>
										</div>

										
										<p class="panel-subtitle">
											Basic validation will display a label with the error after the form control.
										</p> -->
									</header>
									 
									<div class="panel-body">
										<div class="row">
											<div class="col-md-10">
												<div class="form-group">
													<label class="col-sm-3 control-label">District Name<span class="required">*</span></label>
													<div class="col-sm-9">
														<select name="district_name" class="form-control">
														<option value="{{$area_edit[0]->bid}}">{{$area_edit[0]->menu_name_parent}}</option>
														
														@foreach($jilla as $ai)
														<option value="{{$ai->id}}">{{$ai->area_name}}</option>
														
														@endforeach
														</select>
															
													</div>
												</div>
												<div class="form-group">
													<label class="col-sm-3 control-label">Mandal Name <span class="required">*</span></label>
													<div class="col-sm-9">
														<input type="text" name="mandal_name" id="mandal_name" class="form-control" value="{{$area_edit[0]->menu_name_child}}" required>
														@error('mandal_name')
														<font size="3" color="red">{{$message}}</font>
														@enderror	
													</div>
												</div>
												<div class="form-group">
													<label class="col-sm-3 control-label">Mandal CODE <span class="required">*</span></label>
													<div class="col-sm-9">
														<input type="text" name="code" class="form-control" value="{{$area_edit[0]->code}}" required>
														@error('code')
														<font size="3" color="red">{{$message}}</font>
														@enderror	
													</div>
												</div>
												<div class="row">
													<div class="col-12 px-3">
														<div class="text-right pr-2">
															<button class="btn btn-success" type="submit">Update</button>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</section>
							</form>
						</div>
						
					</div>
					<!-- end: page -->
				</section>
				<script>

	 $("#mandal_name").keypress(function(event){
        var inputValue = event.which;
        // allow letters and whitespaces only.
        if(!(inputValue >= 65 && inputValue <= 120) && (inputValue != 32 && inputValue != 0)) { 
            event.preventDefault(); 
        }
    });
</script>
			@stop