<?php 

class modMultiSelect1View {
  private $scope;
    
  public function __construct(modMultiSelect1 $multiSelect1) {
    if (isset($multiSelect1)) {

      $this->loginName = $multiSelect1->login_name;
      $this->lo_id = $multiSelect1->lo_id;

      $menu = new MainMenu('multiselect1', $multiSelect1->lo_id);
      $this->beforeMenu = $menu->before();
      $this->afterMenu  = $menu->after();
      
      $panelFields = new FieldInit('multiselect1'); 
      $fields = $panelFields->get("fieldInit");
      foreach ($fields as $field) {
//print_r ($field);
//print_r ("<br>");        
        eval ($field);
      }
    }
  }  

  public function output() {

    $layout = "

<div class='container'>	
    $this->beforeMenu
  <div id='divmultiselect1' style='border:1px solid black;border-bottom:none;'>
    <div class='row'>
      <div class='col-md-12'>
        <table class='table table-condensed'>
          <tr>
            <td colspan='2'>
    Select Car Wash Options by Vehicle 
            </td>
          </tr>
          <tr>
            <td style='width:35%'>
    $this->selVehicleLayout
            </td>
            <td style='width:65%'>
            </td>
          </tr>
          <tr>
            <td style='width:35%'>
    $this->mulMultiSelect1Layout
            </td>
            <td style='width:65%'>
            </td>
          </tr>
          <tr>
            <td colspan='2'>
    $this->rerMultiSelect1Layout
            </td>
          </tr>
        </table>
      </div> 
    </div>

  </div>
    $this->afterMenu
</div>	


<script>

document.getElementById('tagmultiselect1').click();
document.getElementById('loginmultiselect1').innerHTML='Login: $this->loginName'

if ($this->lo_id == 0) {
  document.getElementById('divmultiselect1').style.display='none';
  document.getElementById('hdrmsgmultiselect1').innerHTML='Login';    
}

$this->mulMultiSelect1Script
$this->selVehicleScript

</script>
  ";
 
  return $layout;
  }	

}

?>