|
@@ -784,8 +784,8 @@ tbody, td, tfoot, th, thead, tr {
|
|
|
<h6 style="padding: 13px 10px 0px; margin-bottom: 0px;">Department</h6>
|
|
|
<div>
|
|
|
<div class="form-icon position-relative p-2" style="display: flex;">
|
|
|
- <input type="text" class="form-control" placeholder="" name="" required="">
|
|
|
- <button class="btn btn2" style="margin-left: -3.4rem; border-radius: 0px 6px 6px 0px">Add</button>
|
|
|
+ <input type="text" class="form-control" placeholder="" name="dapartment" id="dapartment" required="">
|
|
|
+ <button class="btn btn2 add_department" style="margin-left: -3.4rem; border-radius: 0px 6px 6px 0px">Add</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="left mb-2">
|
|
@@ -833,7 +833,8 @@ tbody, td, tfoot, th, thead, tr {
|
|
|
<div class="col-md-8 rounded ms-4">
|
|
|
<div class="card p-2 rounded border-0 mb-4">
|
|
|
<div class="destination_boxes">
|
|
|
- @foreach($study_destinations as $i => $row)
|
|
|
+ <div id="load_market_countries"></div>
|
|
|
+ @foreach($market_countries as $i => $row)
|
|
|
<div class="box country" data-id="{{$row->country->id}}" id="country_{{$row->country->id}}">
|
|
|
<div class="flag_country">
|
|
|
<img src="{{ asset('/assets/img/flags/4x3').'/'.strtolower($row->country->iso_3166_2).'.svg' }}" alt="">
|
|
@@ -860,13 +861,18 @@ tbody, td, tfoot, th, thead, tr {
|
|
|
<div class="col-md-12 mb-3">
|
|
|
<div id="demo15" class="collapse mt-2">
|
|
|
<div class="panel-body" style="padding:10px; background-color: #4b4c6824; border: 1px solid #e9e5e5; border-radius: 5px;">
|
|
|
- <form method="POST" action="">
|
|
|
+
|
|
|
<div class="row">
|
|
|
<div class="col-md-4">
|
|
|
<div class="mb-2">
|
|
|
<label class="form-label config">Destination</label>
|
|
|
- <div class="form-icon position-relative">
|
|
|
- <input type="text" class="form-control" placeholder="Destination" name="destination" required="" style="font-size: 13px;">
|
|
|
+ <div class="form-icon position-relative">
|
|
|
+ <select name="country_id" id="country_id" class="form-control" required="" style="font-size: 13px;">
|
|
|
+ <option value="" selected disabled>Select</option>
|
|
|
+ @foreach($market_countries as $row)
|
|
|
+ <option value="{{$row->country_id}}">{{ cn($row, 'country.name','')}}</option>
|
|
|
+ @endforeach
|
|
|
+ </select>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -874,7 +880,7 @@ tbody, td, tfoot, th, thead, tr {
|
|
|
<div class="mb-2">
|
|
|
<label class="form-label config">University Name</label>
|
|
|
<div class="form-icon position-relative">
|
|
|
- <input type="text" class="form-control" placeholder="University Name" name="university_name" required="" style="font-size: 13px;">
|
|
|
+ <input type="text" class="form-control" placeholder="University Name" id="university_name" name="university_name" required="" style="font-size: 13px;">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -882,7 +888,7 @@ tbody, td, tfoot, th, thead, tr {
|
|
|
<div class="mb-2">
|
|
|
<label class="form-label config">University Website</label>
|
|
|
<div class="form-icon position-relative">
|
|
|
- <input type="text" class="form-control" placeholder="University Website" name="university_website" required="" style="font-size: 13px;">
|
|
|
+ <input type="text" class="form-control" placeholder="University Website" id="university_website" name="university_website" required="" style="font-size: 13px;">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -890,33 +896,17 @@ tbody, td, tfoot, th, thead, tr {
|
|
|
<div class="row">
|
|
|
<div class="col-md-12">
|
|
|
<div class="text-end">
|
|
|
- <button class="btn btn2">Save</button>
|
|
|
+ <button class="btn btn2" id="submit_uni">Save</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </form>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <table class="table table-bordered list_table">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>Sl</th>
|
|
|
- <th>Designation</th>
|
|
|
- <th>University Name</i></th>
|
|
|
- <th>University website</i></th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody style="border-style: dashed;">
|
|
|
- <tr>
|
|
|
- <td style="font-size: 11px;">1</td>
|
|
|
- <td style="font-size: 11px;">1</td>
|
|
|
- <td style="font-size: 11px;">1</td>
|
|
|
- <td style="font-size: 11px;">1</td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ {{-- Load country wise university --}}
|
|
|
+ <div id="country_wise_university"></div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -961,6 +951,49 @@ tbody, td, tfoot, th, thead, tr {
|
|
|
|
|
|
@include('web.layouts.modal')
|
|
|
<script>
|
|
|
+ function fetch_sub_content(selector, url, args=null){
|
|
|
+
|
|
|
+ var config={
|
|
|
+ spinner: true
|
|
|
+ }
|
|
|
+
|
|
|
+ if(typeof args=='object'){
|
|
|
+ config=Object.assign(config, args);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(config.spinner){
|
|
|
+
|
|
|
+ $(selector).waitMe({
|
|
|
+ effect: 'facebook',
|
|
|
+ text: 'Please! Wait ...'
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ $(selector).load(url, null, function(){
|
|
|
+ $(selector).waitMe('hide');
|
|
|
+ if(typeof args=='function') args();
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ function wait_me(selector, config=null){
|
|
|
+
|
|
|
+ if(config){
|
|
|
+
|
|
|
+ selector.waitMe(config);
|
|
|
+
|
|
|
+ }else{
|
|
|
+
|
|
|
+ selector.waitMe({
|
|
|
+ effect: 'facebook',
|
|
|
+ //color: '#000',
|
|
|
+ text: 'Please! Wait ...'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
function pop_up_msg(msg='No message specified', type='success', callback=null){
|
|
|
new Noty({
|
|
|
theme:'sunset',
|
|
@@ -985,7 +1018,8 @@ tbody, td, tfoot, th, thead, tr {
|
|
|
|
|
|
}
|
|
|
|
|
|
- $(function(){
|
|
|
+ $(function(){
|
|
|
+
|
|
|
$('.status_change').on('click', function(e){
|
|
|
var self =$(this);
|
|
|
var id =$(this).data('id');
|
|
@@ -1025,6 +1059,66 @@ tbody, td, tfoot, th, thead, tr {
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
+ fetch_sub_content(
|
|
|
+ '#country_wise_university',
|
|
|
+ "{{ route('admin.sub-content', ['name'=>'country_wise_university']) }}"
|
|
|
+ );
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ $('#submit_uni').on('click', function(){
|
|
|
+ var country_id =$('#country_id option:selected').val();
|
|
|
+ var university_name =$('#university_name').val();
|
|
|
+ var university_website =$('#university_website').val();
|
|
|
+
|
|
|
+ var form_data={
|
|
|
+ _token: "{{ csrf_token() }}",
|
|
|
+ country_id: country_id,
|
|
|
+ university_name: university_name,
|
|
|
+ university_website: university_website,
|
|
|
+ }
|
|
|
+
|
|
|
+ $.post("{{ route('ajax-post', ['name'=>'add_country_wise_uni']) }}", form_data, function(res){
|
|
|
+ pop_up_msg(res.msg);
|
|
|
+
|
|
|
+ fetch_sub_content(
|
|
|
+ '#country_wise_university',
|
|
|
+ "{{ route('admin.sub-content', ['name'=>'country_wise_university']) }}"
|
|
|
+ );
|
|
|
+
|
|
|
+ }).fail(function(err){
|
|
|
+
|
|
|
+ pop_up_msg(err_msg(err), 'error');
|
|
|
+
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ $('.add_department').on('click', function(){
|
|
|
+
|
|
|
+ var dapartment =$('#dapartment').val();
|
|
|
+
|
|
|
+ var form_data={
|
|
|
+ _token: "{{ csrf_token() }}",
|
|
|
+ dapartment: dapartment,
|
|
|
+ }
|
|
|
+
|
|
|
+ $.post("{{ route('ajax-post', ['name'=>'add_department']) }}", form_data, function(res){
|
|
|
+ pop_up_msg(res.msg);
|
|
|
+
|
|
|
+ fetch_sub_content(
|
|
|
+ '#load_department',
|
|
|
+ "{{ route('admin.sub-content', ['name'=>'load_department']) }}"
|
|
|
+ );
|
|
|
+
|
|
|
+ }).fail(function(err){
|
|
|
+
|
|
|
+ pop_up_msg(err_msg(err), 'error');
|
|
|
+
|
|
|
+ });
|
|
|
+ });
|
|
|
});
|
|
|
</script>
|
|
|
</body>
|