<?php 
/********************************************************************************* 
 *  This file is part of Sentrifugo.
 *  Copyright (C) 2014 Sapplica
 *   
 *  Sentrifugo is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Sentrifugo is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Sentrifugo.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  Sentrifugo Support <support@sentrifugo.com>
 ********************************************************************************/
$msgtitle = $this->controllername.'_delete';
sapp_Helper::editdeleteForView(MANAGEEXTERNALUSERS,$this->controllername,$this->id,$msgtitle);
?>

<?php
if($this->nodata != '')
{
?>
<div class="ml-alert-1-info m1-info-set-2">
    <div class="style-1-icon info"></div>
       No data found.
</div>
<?php 
}
else 
{
    
?>
<script type="text/javascript" language="javascript">
$(document).ready(function(){
    $( "#tabs" ).tabs({
beforeActivate: function( event, ui ) {
   var id =ui.newPanel.prop('id'); 
   if(id === 'tabs-1')
    {
        ui.newPanel.parent().addClass('right-over-border');
    }
    else
    {
        ui.newPanel.parent().removeClass('right-over-border');
    }
}
}).addClass( "ui-tabs-vertical ui-helper-clearfix" );
    $( "#tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" );        
    

});//end of ready function.
</script>
<div id="error_message" style="display:none;"></div>

<?php echo $this->form->id;
      $data = $this->data;
   ?>
   <?php 
$employeeId = $this->form->employeeId->getValue();
$firstname = $this->form->firstname->getValue();
$lastname = $this->form->lastname->getValue();
$emailAddress = $this->form->emailaddress->getValue();
sapp_Helper::viewHeader();
sapp_Helper::viewBody('nor',$this->form->employeeId->getLabel(),(!empty($employeeId))?$this->form->employeeId->getValue():"...",'','');
?>
  <div id="iddiv_fullname">
  <?php 
sapp_Helper::viewBody('alt',$this->form->firstname->getLabel(),(!empty($firstname))?$this->form->firstname->getValue():"...",$this->form->lastname->getLabel(),(!empty($lastname))?$this->form->lastname->getValue():"...");
?>
</div>
<?php 
sapp_Helper::viewBody('nor', $this->form->emailaddress->getLabel(),(!empty($emailAddress))?$this->form->emailaddress->getValue():"...",$this->form->emprole->getLabel(),(!empty($this->data['emprole']))?$this->data['emprole']:"...");
sapp_Helper::viewBody('alt',$this->form->entrycomments->getLabel(),(!empty($this->data['entrycomments']))?$this->data['entrycomments']:"...",'',''); 
?>

                <?php if($this->form->id->getValue() != '')
                {
                    if($data['isactive'] < 2)
                    {
                ?>
                    
                        <?php 
                        $sel_act = $sel_dact = "";
                        if($data['isactive'] == 1)
                        {
                            $sel_act = "selected";
                        }
                        else if($data['isactive'] == 0)
                        {
                            $sel_dact = "selected";
                        }
                        
                        ?>
           <div class="main_view_sub_left">
             <div class="width_20"><label>Status</label></div>
            <div class="width_80">
                <label>
                  <div class="division">
                     <div class="field switch">
                         <p class="cb-enable <?php echo $sel_act;?>" style="cursor:default"><span style="cursor:default">Active</span></p>
                         <p class="cb-disable <?php echo $sel_dact;?>" style="cursor:default"><span style="cursor:default">Inactive</span></p>                            
                        </div>
                    </div>   
                 </label> 
              </div>
         </div>
 <?php
                    }
                }
                
sapp_Helper::viewFooter();
?>
  
   <!-- end of total form div-->
 <!--   <div class="new-form-ui-submit">
        <input type="submit" onclick="changeeditscreen('<?php echo $this->controllername;?>',<?php echo $this->id;?>);" value="Edit" />               
        <button onclick="window.location.href='<?php echo  BASE_URL; ?>usermanagement';" type="button" id="Cancel" name="Cancel" title='Go back to list.'>Cancel</button>
    </div> -->

<?php 
}
?>