<?php
include_once("c_esmo_setting_group_of_disease.php");
class c_page_cab_esmo_setting_group_of_disease_edit extends c_page_cab_esmo_setting_group_of_disease
{
 public $h1='Редактирование состава группы по болезни' ;
 public $rec_group ;

 function select_obj_info()
 { parent::select_obj_info() ;
   if ($this->rec_group['pkey']) $this->h1.='" - редактирование состава участников' ;
 }

 function block_main()
 {   $this->page_title() ;
     ?>
     <h2>Добавление персонала</h2>
     <div id="panel_filter">
              <form id="sky-form" class="sky-form"><input type="hidden" name="filter_dir" value="<?echo $this->rec_group['__href'].'edit/'?>">
                   <fieldset>
                       <div class="row">
                           <section class="col col-4">
                                <label class="label">ФИО</label>
                                <label class="input">
                                     <input type="text" name="filter[name]" placeholder="" SetAutoComplete cmd="autocomplette_personal_name" value="<?echo $this->filter['name']?>">
                                </label>
                           </section>
                           <section class="col col-2">
                               <label class="label">Пропуск</label>
                               <label class="input">
                                   <input type="text" name="filter[propusk]" placeholder="" LANG="LAT" value="<?echo $this->filter['propusk']?>">
                               </label>
                           </section>
                           <section class="col col-2">
                               <label class="label">Должность:</label>
                               <label class="select">
                                    <select name="filter[working_id]"><option value="0"></option>
                                        <? if (_sizeof(_IL('IL_works')->recs)) foreach(_IL('IL_works')->recs as $rec_work) {?><option value="<?echo $rec_work['id']?>" <?if ($this->filter['working_id']==$rec_work['id']) echo 'selected' ?>><?echo $rec_work['obj_name']?></option><?}?>
                                    </select>
                               </label>
                           </section>
                         </div>
                   </fieldset>
                  <div id="panel_buttons"><input type="submit" class="button v2" cmd="set_filter" value="Найти"></div>
               </form>
        </div><br>
      <?

     if ($this->filter['propusk'] or $this->filter['name']  or $this->filter['working_id'])
     {   ?><form class="sky-form no_box_shadow"><?
         include_once(_DIR_EXT.'/esmo_setting/report_personals_to_group.php') ;
         $report_obj=new report_personals_to_group() ;
         $report_obj->filter['order']='obj_name';
         $cnt=$report_obj->view_as_HTML(array('cur_group'=>$this->rec_group['id'])) ;
         if ($cnt){?><br><div id="panel_buttons"><button class="button v2" cmd="esmo_setting/add_personal_to_group" group_reffer="<?echo $this->rec_group['_reffer']?>" update_url="<?echo $this->rec_group['__href'].'edit/'?>">Добавить выбранных</button></div><?}
         ?></form><br><br><br><?
     }

 }


}



?>
