|
@@ -872,76 +872,59 @@ tbody, td, tfoot, th, thead, tr {
|
|
|
<div class="single_glance_row mt-5" style="border-bottom: 1px solid #e8eef1;">
|
|
|
<div class="col-md-12">
|
|
|
<div id="demo16" 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-6">
|
|
|
- <div class="mb-2">
|
|
|
- <label class="form-label config">First Name</label>
|
|
|
- <div class="form-icon position-relative">
|
|
|
- <input type="text" class="form-control" placeholder="First Name" name="first-name" required="" style="font-size: 13px;">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="col-md-6">
|
|
|
- <div class="mb-2">
|
|
|
- <label class="form-label config">Last Name</label>
|
|
|
- <div class="form-icon position-relative">
|
|
|
- <input type="text" class="form-control" placeholder="Last Name" name="last-name" required="" style="font-size: 13px;">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="col-md-12">
|
|
|
+ <div class="panel-body profile_form" style="padding:10px; background-color: #4b4c6824; border: 1px solid #e9e5e5; border-radius: 5px;">
|
|
|
+ <input type="hidden" id="u_id" name="id" value="{{$user->id}}">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-6">
|
|
|
<div class="mb-2">
|
|
|
- <label class="form-label config">University Name</label>
|
|
|
+ <label class="form-label config">First 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="First Name" id="first_name" name="first_name" value="{{$user->first_name}}" required="" style="font-size: 13px;">
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-md-12">
|
|
|
+ </div>
|
|
|
+ <div class="col-md-6">
|
|
|
<div class="mb-2">
|
|
|
- <label class="form-label config">Department</label>
|
|
|
+ <label class="form-label config">Last Name</label>
|
|
|
<div class="form-icon position-relative">
|
|
|
- <input type="text" class="form-control" placeholder="Department" name="department" required="" style="font-size: 13px;">
|
|
|
+ <input type="text" class="form-control" placeholder="Last Name" id="last_name" name="last_name" value="{{$user->last_name}}" required="" style="font-size: 13px;">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="col-md-12">
|
|
|
- <div class="text-end">
|
|
|
- <button class="btn btn2">Update</button>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-12">
|
|
|
+ <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" id="university_name" name="university_name" value="{{$user->university_name}}" required="" style="font-size: 13px;">
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-12">
|
|
|
+ <div class="mb-2">
|
|
|
+ <label class="form-label config">Department</label>
|
|
|
+ <div class="form-icon position-relative">
|
|
|
+ <select class="form-control" name="department" id="department_id">
|
|
|
+ <option value="" disabled selected>Choose one..</option>
|
|
|
+ @foreach($departments as $row)
|
|
|
+ <option value="{{$row->id}}" @if($user->department ==$row->id) selected @endif>{{ $row->name}}</option>
|
|
|
+ @endforeach
|
|
|
+
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-12">
|
|
|
+ <div class="text-end">
|
|
|
+ <button class="btn btn2 update_profile">Update</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="left mb-2 mt-2">
|
|
|
- <div>
|
|
|
- <div class="single_glance_row mt-5">
|
|
|
- <span class="title" style="font-size:11px; font-weight: 600;">Name :</span>
|
|
|
- <span class="tbl2 mb-2">
|
|
|
- {{$user->first_name}} {{$user->last_name}}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <div class="single_glance_row mt-1">
|
|
|
- <span class="title" style="font-size:11px; font-weight: 600;">Email :</span>
|
|
|
- <span style="font-size: 11px; color: #868e96;">{{$user->email}}</span>
|
|
|
- </div>
|
|
|
- <div class="single_glance_row mt-1" style="display: flex;">
|
|
|
- <span class="title" style="font-size:11px; font-weight: 600;">University Name :</span>
|
|
|
- <span style="font-size: 11px; color: #868e96;">{{$user->university_name }}</span>
|
|
|
- </div>
|
|
|
- <div class="single_glance_row mt-1" style="display: flex;">
|
|
|
- <span class="title" style="font-size:11px; font-weight: 600;">Department : </span>
|
|
|
- @if(isset($user->department))
|
|
|
- <span style="font-size: 11px; color: #868e96;">{{ cn($user,'department_name.name','')}}</span>
|
|
|
- @else
|
|
|
- <span style="font-size: 11px; color: #868e96;">{{ $user->others_department }}</span>
|
|
|
- @endif
|
|
|
- </div>
|
|
|
+ <div id="load_profile_info">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -1056,7 +1039,49 @@ tbody, td, tfoot, th, thead, tr {
|
|
|
<script src="{{ asset('css/wait-me/waitMe.min.js')}}"></script>
|
|
|
|
|
|
<script>
|
|
|
- function pop_up_msg(msg='No message specified', type='success', callback=null){
|
|
|
+ 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',
|
|
|
text: msg,
|
|
@@ -1082,6 +1107,44 @@ tbody, td, tfoot, th, thead, tr {
|
|
|
|
|
|
|
|
|
$(function(){
|
|
|
+
|
|
|
+ fetch_sub_content(
|
|
|
+ '#load_profile_info',
|
|
|
+ "{{ route('teacher.sub-content', ['name'=>'load_profile_info']) }}"
|
|
|
+ );
|
|
|
+
|
|
|
+ $('.update_profile').on('click', function(){
|
|
|
+
|
|
|
+ var id =$('#u_id').val();
|
|
|
+ var first_name =$('#first_name').val();
|
|
|
+ var last_name =$('#last_name').val();
|
|
|
+ var university_name =$('#university_name').val();
|
|
|
+ var department =$('#department_id option:selected').val();
|
|
|
+
|
|
|
+ var form_data={
|
|
|
+ _token: "{{ csrf_token() }}",
|
|
|
+ id: id,
|
|
|
+ first_name: first_name,
|
|
|
+ last_name: last_name,
|
|
|
+ university_name: university_name,
|
|
|
+ department: department,
|
|
|
+ }
|
|
|
+
|
|
|
+ $.post("{{ route('ajax-post', ['name'=>'update_profile']) }}", form_data, function(res){
|
|
|
+ pop_up_msg(res.msg);
|
|
|
+
|
|
|
+ fetch_sub_content(
|
|
|
+ '#load_profile_info',
|
|
|
+ "{{ route('teacher.sub-content', ['name'=>'load_profile_info']) }}"
|
|
|
+ );
|
|
|
+
|
|
|
+ }).fail(function(err){
|
|
|
+
|
|
|
+ pop_up_msg(err_msg(err), 'error');
|
|
|
+
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
$('.change_password').on('click', function(){
|
|
|
var id =$('#user_id').val();
|
|
|
var old_password =$('#old_password').val();
|