|
@@ -29,50 +29,49 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
<div class="col-md-4">
|
|
|
<div class="mb-2">
|
|
|
- <label class="form-label config">University</label>
|
|
|
+ <label class="form-label config">Department</label>
|
|
|
<div class="form-icon position-relative">
|
|
|
- <select name="university" id="university" class="form-control" required="" style="font-size: 13px;">
|
|
|
- <option selected disabled>Select University</option>
|
|
|
- @foreach($universities as $row)
|
|
|
- <option value="{{$row->id}}" @if($row->id==$edit_data->university_name) selected @endif>{{$row->name}}</option>
|
|
|
+ <select name="department" class="form-control" required="" style="font-size: 13px;">
|
|
|
+ <option selected disabled>Select Department</option>
|
|
|
+ @foreach($departments as $row)
|
|
|
+ <option value="{{$row->id}}" @if($row->id==$edit_data->department) selected @endif>{{$row->name}}</option>
|
|
|
@endforeach
|
|
|
</select>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
<div class="col-md-4">
|
|
|
<div class="mb-2">
|
|
|
- <label class="form-label config">Department</label>
|
|
|
+ <label class="form-label config">Destination</label>
|
|
|
<div class="form-icon position-relative">
|
|
|
- <select name="department" class="form-control department_id" required="" style="font-size: 13px;">
|
|
|
- <option selected disabled>Select Department</option>
|
|
|
- @foreach($departments as $row)
|
|
|
- <option value="{{$row->id}}" @if($row->id==$edit_data->department) selected @endif>{{$row->name}}</option>
|
|
|
- @endforeach
|
|
|
- <option value="">Others</option>
|
|
|
+ <select name="destination" id="destination_id" class="form-control" required="" style="font-size: 13px;">
|
|
|
+ <option selected disabled>Select Destination</option>
|
|
|
+ @foreach($market_countries as $row)
|
|
|
+ <option value="{{$row->country_id}}" @if($row->country_id==$edit_data->nationality) selected @endif>{{$row->name}}</option>
|
|
|
+ @endforeach
|
|
|
</select>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- {{-- <div class="col-md-4 others_department" style="display: none;">
|
|
|
- <div class="mb-2">
|
|
|
- <label class="form-label config" >Others Department</label>
|
|
|
- <div class="form-icon position-relative">
|
|
|
- <input type="text" class="form-control" placeholder="Others Department" id="others_department" name="others_department" value="{{$edit_data->others_department}}" style="font-size: 13px;">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div> --}}
|
|
|
+
|
|
|
<div class="col-md-4">
|
|
|
<div class="mb-2">
|
|
|
- <label class="form-label config">Website</label>
|
|
|
- <div class="form-icon position-relative">
|
|
|
- <input type="text" class="form-control" placeholder="www.xyz.com" id="uni_website" name="uni_website" value="{{$edit_data->uni_website}}" style="font-size: 13px;">
|
|
|
+ <label class="form-label config">University</label>
|
|
|
+ <div class="form-icon position-relative">
|
|
|
+ <input type="hidden" id="edit_university_id" value="{{$edit_data->university_id}}">
|
|
|
+ <select name="university" id="university_id" class="form-control" required="" style="font-size: 13px;">
|
|
|
+ <option selected disabled>Select University</option>
|
|
|
+ {{-- @foreach($universities as $row)
|
|
|
+ <option value="{{$row->id}}" @if($row->id==$edit_data->university_id) selected @endif>{{$row->name}}</option>
|
|
|
+ @endforeach --}}
|
|
|
+ </select>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
<div class="col-md-12">
|
|
@@ -90,15 +89,52 @@
|
|
|
|
|
|
<script>
|
|
|
$(function(){
|
|
|
- // $('.department_id').change(function() {
|
|
|
- // var value = $(this).attr('selected','selected').val();
|
|
|
- // if (value == "" ) {
|
|
|
- // $('.others_department').show();
|
|
|
- // } else {
|
|
|
- // $('.others_department').removeClass('display:none');
|
|
|
- // $('.others_department').hide();
|
|
|
- // }
|
|
|
- // });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ $('#destination_id').change(function(){
|
|
|
+ var self=$(this);
|
|
|
+ var id = $(this).val();
|
|
|
+ var url="{{ route('destination-wise-university')}}";
|
|
|
+
|
|
|
+ if(id){
|
|
|
+
|
|
|
+ $.get(url, {country_id:id}).done(function(res){
|
|
|
+ $("#university_id").empty();
|
|
|
+ $("#university_id").append('<option value="">Select One..</option>');
|
|
|
+ res.data.universities.forEach(function(row){
|
|
|
+ $("#university_id").append('<option value="'+row.id+'">'+row.name+'</option>');
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ }else{
|
|
|
+ $("#university_id").empty();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ var destination_id =$("#destination_id").val();
|
|
|
+ var edit_university_id =$("#edit_university_id").val();
|
|
|
+
|
|
|
+ if (destination_id) {
|
|
|
+ var self=$(this);
|
|
|
+ var url="{{ route('destination-wise-university')}}";
|
|
|
+ $.get(url, {country_id:destination_id}).done(function(res){
|
|
|
+ $("#university_id").empty();
|
|
|
+ var selected = 'selected'
|
|
|
+ res.data.universities.forEach(function(row){
|
|
|
+ if(row.id ==edit_university_id){
|
|
|
+ $("#university_id").append('<option selected="'+selected+'" value="'+row.id+'">'+row.name+'</option>');
|
|
|
+ }
|
|
|
+
|
|
|
+ if(row.id !=edit_university_id){
|
|
|
+ $("#university_id").append('<option value="'+row.id+'">'+row.name+'</option>');
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
$('.edit_register_pending_teacher_form').on('submit', function(event){
|
|
|
event.preventDefault();
|