Sindbad~EG File Manager

Current Path : /home/numerotech/public_html/livemt2023.aios-scientificcommittee.org/app/views/vt/
Upload File :
Current File : //home/numerotech/public_html/livemt2023.aios-scientificcommittee.org/app/views/vt/step1.blade.php

{{-- 
 VT step1.blade 
--}}

{{ Form::open(array('url' => 'vt/store','role'=>'form','id'=>'form_s1')) }}

{{ Form::hidden('hdnId', isset($vt)? $vt->abs_id : 0,array('id'=>'hdnId')) }}
{{ Form::hidden('hdnStep', '1',array('id'=>'hdnStep')) }}
{{ Form::hidden('hdnIsNext', '1',array('id'=>'hdnIsNext')) }}

{{ Form::hidden('hdnPAId', $pres_auth_id,array('id'=>'hdnPAId')) }}

<div class="row">            
    <div class="col-sm-12">               
       <div class="alert alert-success" style="display:none">            
       </div>

      <div class="alert alert-danger"  style="display:none">                  
      </div>
    </div>
</div>

<div class="col-lg-12 col-md-12 col-sm-12 nopadding margin10">
      <div class="step activestep">STEP 1 </div>
      <div class="step ">STEP 2 </div>
      <div class="step">STEP 3 </div>
      <div class="step">STEP 4 </div> 
      <div class="step">STEP 5 </div> 
</div>


<!--step 1 details  -->
<div class="row">            
     <div class="col-lg-6 col-md-6 col-sm-12">    
          <label>Chief Author Membership Number </label>             
          <p>{{  empty($membership)? '':$membership->membership_no}}</p>    
    </div>            
     <div class="col-lg-6 col-md-6 col-sm-12">            
          <label>Chief Author Name </label>             
          <p>{{ isset(Auth::user()->prefix)?Auth::user()->prefix.'.':'' }}{{ Auth::user()->first_name }}</p>    
    </div>            
</div>

<div class="row">            
     <div class="col-lg-12 col-md-12 col-sm-12">    
      <label>Presenting Author : </label> <label id="hdnPAId-error" class="error" for="hdnPAId"></label>                             
        <div class="table-responsive">             
          <table id="tbl_PA" class="table table-bordered" style="display:none">
            <thead>
              <tr>                         
                <th>
                Membership No
                </th>
                <th>
                Author Name
                </th>
                <th>
                Email
                </th>
                <th>
                Mobile
                </th>                                                                     
              </tr>
            </thead>
            <tbody>                   

            </tbody>  

          </table>
        </div>                    

      <div id="show_Add_PA" class="form-group text-center"  style="display:none">
          <input type="button" value="Click here to Search the Presenting Author Details" id ="btnSearch" class="btn btn-md btn-primary"
          onclick="SearchPAPOP()">
          <!-- SearchPAPOP funcation in search_pa.blade.php  -->
      </div>

    </div>        
  </div>

  

<div class="row">      
       <div class="col-lg-6 col-md-6 col-sm-12">                          
              <label>Video film category <sup>*</sup></label>                  
              {{ Form::select('ddlSection',$categories,$vt->category_id ,array("id"=>"ddlSection","class"=>"form-control ddlSection"))}}                         
        </div>            
</div>

<!--End step 1 details  -->

<div class="row margin30">  
      <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 page-left">
      </div>
      <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 page-right">
      <input type="button" value="Next" id ="btnNext_s1" class="btn primary button-large pull-right"
      onclick="Move(1,1)">
    </div>
</div>

{{ Form::close() }}

@include('vt.search_pa')

<script type="text/javascript">

var hdnPAId     = "#hdnPAId"
var tbl_PA      = "#tbl_PA";     
var show_Add_PA = "#show_Add_PA"; 

(function($){
  getPADetails();
  hideshowPA();    
}(jQuery));

function getPADetails()
{
      $.ajax({
            url: baseUrl + '/vt/get_pa_details',
            type: 'POST',
            dataType: 'json',
            async: false,
            data: {'pa_id': $(hdnPAId).val()},            
            })
        .done(function(d) {                                          
          data = d.data;
          if(d.code == 1)
          {
              if(data.prefix==null)
            {
                name = data.name          
            }
            else
            {
                name =data.prefix +"."+ data.name          
            }
              
              
           setPA(data.user_id,data.membership_no,name,data.email,data.mobile);
          }
        })
        .fail(function() {
            //alert("Internal Server Error");
            //return false;
        });     
}


function hideshowPA() {
  clearError();
 if($(hdnPAId).val()>0)
 {
    $(tbl_PA).show();
    $(show_Add_PA).hide();
 }
 else
 {
    $(tbl_PA).hide();
    $(show_Add_PA).show();
 } 
}

function store_pa(user_id,membership_no,name,email,mobile)
{
  
   $.ajax({
        type: 'POST', // <-- get method of form
        url: baseUrl + '/vt/store_pa', // <-- get action of form
        data: {'pa_user_id':user_id,'vt_id':$(hdnId).val()}, 
        async: false,
        dataType: 'json',
        // <-- serialize all fields into a string that is ready to be posted to your PHP file
        beforeSend: function(){
            //$('#result').html('<img src="loading.gif" />');
        },
        success: function(data){
          if(data.code == 1)
          {
              setPA(user_id,membership_no,name,email,mobile);
          }
          else
          {
            errormsg(data.msg)
          }
        }
    });   
   
  }


  function Remove(pa_id) {
    //var checkstr =  confirm('Are you sure you want to delete this Presenting Author?');
    var checkstr = true;
    if(checkstr == true){
        $.ajax({
            type: 'POST', // <-- get method of form
            url: baseUrl + '/vt/remove_pa', // <-- get action of form
            data: {'pa_id':pa_id,'vt_id':$(hdnId).val()} , // <-- serialize all fields into a string that is ready to be posted to your PHP file
            dataType: 'json',
            beforeSend: function(){
                //$('#result').html('<img src="loading.gif" />');
            },
            success: function(data){
              if(data.code == 1)
              {              
                  //$('#frm').html(data.data);
                $(hdnPAId).val(0);  
                hideshowPA();
              }   
              else
              {
                 errormsg(data.msg);
              }       
            }
        });   
      }
}


function onSelectPA(user_id,membership_no,name,email,mobile)
{
  store_pa(user_id,membership_no,name,email,mobile);
}

function setPA(user_id,membership_no,name,email,mobile)
{
    closeModel("#searchModalPA");
    $(hdnPAId).val(user_id);

    $(tbl_PA + ' tbody').html('');
    var str = "";    
    if(user_id  >0)         
    {
        str +="<tr>";
        str +="<td>" + (membership_no==null?'':membership_no)  + "</td>";    
        str +="<td>" + (name==null?'':name)  + "</td>";
        str +="<td>" + (email==null?'':email)  + "</td>";        
        str +="<td>" + (mobile==null?'':mobile)  + "</td>";                
        str +="</tr>";      
        str +="<tr>";
        str +="<td colspan=\"4\">" + "<a href=\"#\" onclick=\"ChangePA()\">Click here to Change Presenting Author</a>" + "</td>"; 
        str +="</tr>";             
    }

    $(tbl_PA + ' tbody').html(str);

    hideshowPA()
}

function ChangePA() {  
    Remove($(hdnPAId).val());
}
  
</script>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists