|
| 1 | +<form action="<?php echo $input->form_action?>" method="get" name="SearchFormRight" ng-non-bindable autocomplete="off"> |
| 2 | + |
| 3 | + <input type="hidden" name="doSearch" value="1"> |
| 4 | + |
| 5 | + <div class="row mb-2"> |
| 6 | + <div class="col-md-3"> |
| 7 | + <div class="form-group"> |
| 8 | + <label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','Department');?></label> |
| 9 | + <?php echo erLhcoreClassRenderHelper::renderMultiDropdown(array( |
| 10 | + 'input_name' => 'department_ids[]', |
| 11 | + 'optional_field' => erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','Choose department'), |
| 12 | + 'selected_id' => $input->department_ids, |
| 13 | + 'css_class' => 'form-control', |
| 14 | + 'display_name' => 'name', |
| 15 | + 'ajax' => 'deps', |
| 16 | + 'list_function_params' => array_merge(array('sort' => '`name` ASC', 'limit' => 50), erLhcoreClassUserDep::conditionalDepartmentFilter()), |
| 17 | + 'list_function' => 'erLhcoreClassModelDepartament::getList' |
| 18 | + )); ?> |
| 19 | + </div> |
| 20 | + </div> |
| 21 | + <div class="col-md-3"> |
| 22 | + <div class="form-group"> |
| 23 | + <label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','Chat operator');?></label> |
| 24 | + <?php echo erLhcoreClassRenderHelper::renderMultiDropdown(array( |
| 25 | + 'input_name' => 'user_ids[]', |
| 26 | + 'optional_field' => erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','Choose operator'), |
| 27 | + 'selected_id' => $input->user_ids, |
| 28 | + 'css_class' => 'form-control', |
| 29 | + 'display_name' => 'name_official', |
| 30 | + 'ajax' => 'users', |
| 31 | + 'list_function_params' => array_merge(erLhcoreClassGroupUser::getConditionalUserFilter(), array('sort' => '`name` ASC', 'limit' => 50)), |
| 32 | + 'list_function' => 'erLhcoreClassModelUser::getUserList' |
| 33 | + )); ?> |
| 34 | + </div> |
| 35 | + </div> |
| 36 | + </div> |
| 37 | + |
| 38 | + <div class="row mb-2"> |
| 39 | + <div class="col-md-2"> |
| 40 | + <div class="form-group"> |
| 41 | + <label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','Date from');?></label> |
| 42 | + <input type="text" class="form-control form-control-sm" name="timefrom" id="id_timefrom" value="<?php echo htmlspecialchars((string)$input->timefrom)?>" placeholder="<?php echo date('Y-m-d', time() - 7 * 24 * 3600)?>"> |
| 43 | + </div> |
| 44 | + </div> |
| 45 | + <div class="col-md-3"> |
| 46 | + <div class="form-group"> |
| 47 | + <label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','Hour and minute from');?> <small>[<?php echo date('H:i:s')?>]</small></label> |
| 48 | + <div class="row"> |
| 49 | + <div class="col-4"> |
| 50 | + <select name="timefrom_hours" class="form-control form-control-sm"> |
| 51 | + <option value=""><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','Select hour');?></option> |
| 52 | + <?php for ($i = 0; $i <= 23; $i++) : ?> |
| 53 | + <option value="<?php echo $i?>" <?php if (isset($input->timefrom_hours) && $input->timefrom_hours === $i) : ?>selected="selected"<?php endif;?>><?php echo str_pad($i,2, '0', STR_PAD_LEFT);?> h.</option> |
| 54 | + <?php endfor;?> |
| 55 | + </select> |
| 56 | + </div> |
| 57 | + <div class="col-4"> |
| 58 | + <select name="timefrom_minutes" class="form-control form-control-sm"> |
| 59 | + <option value=""><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','Select minute');?></option> |
| 60 | + <?php for ($i = 0; $i <= 59; $i++) : ?> |
| 61 | + <option value="<?php echo $i?>" <?php if (isset($input->timefrom_minutes) && $input->timefrom_minutes === $i) : ?>selected="selected"<?php endif;?>><?php echo str_pad($i,2, '0', STR_PAD_LEFT);?> m.</option> |
| 62 | + <?php endfor;?> |
| 63 | + </select> |
| 64 | + </div> |
| 65 | + <div class="col-4"> |
| 66 | + <select name="timefrom_seconds" class="form-control form-control-sm"> |
| 67 | + <option value=""><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','Select seconds');?></option> |
| 68 | + <?php for ($i = 0; $i <= 59; $i++) : ?> |
| 69 | + <option value="<?php echo $i?>" <?php if (isset($input->timefrom_seconds) && $input->timefrom_seconds === $i) : ?>selected="selected"<?php endif;?>><?php echo str_pad($i,2, '0', STR_PAD_LEFT);?> s.</option> |
| 70 | + <?php endfor;?> |
| 71 | + </select> |
| 72 | + </div> |
| 73 | + </div> |
| 74 | + </div> |
| 75 | + </div> |
| 76 | + <div class="col-md-2"> |
| 77 | + <div class="form-group"> |
| 78 | + <label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','Date to');?></label> |
| 79 | + <input type="text" class="form-control form-control-sm" name="timeto" id="id_timeto" value="<?php echo htmlspecialchars((string)$input->timeto)?>" placeholder="<?php echo date('Y-m-d')?>"> |
| 80 | + </div> |
| 81 | + </div> |
| 82 | + <div class="col-md-3"> |
| 83 | + <div class="form-group"> |
| 84 | + <label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','Hour and minute to');?> <small>[<?php echo date('H:i:s')?>]</small></label> |
| 85 | + <div class="row"> |
| 86 | + <div class="col-4"> |
| 87 | + <select name="timeto_hours" class="form-control form-control-sm"> |
| 88 | + <option value=""><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','Select hour');?></option> |
| 89 | + <?php for ($i = 0; $i <= 23; $i++) : ?> |
| 90 | + <option value="<?php echo $i?>" <?php if (isset($input->timeto_hours) && $input->timeto_hours === $i) : ?>selected="selected"<?php endif;?>><?php echo str_pad($i,2, '0', STR_PAD_LEFT);?> h.</option> |
| 91 | + <?php endfor;?> |
| 92 | + </select> |
| 93 | + </div> |
| 94 | + <div class="col-4"> |
| 95 | + <select name="timeto_minutes" class="form-control form-control-sm"> |
| 96 | + <option value=""><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','Select minute');?></option> |
| 97 | + <?php for ($i = 0; $i <= 59; $i++) : ?> |
| 98 | + <option value="<?php echo $i?>" <?php if (isset($input->timeto_minutes) && $input->timeto_minutes === $i) : ?>selected="selected"<?php endif;?>><?php echo str_pad($i,2, '0', STR_PAD_LEFT);?> m.</option> |
| 99 | + <?php endfor;?> |
| 100 | + </select> |
| 101 | + </div> |
| 102 | + <div class="col-4"> |
| 103 | + <select name="timeto_seconds" class="form-control form-control-sm"> |
| 104 | + <option value=""><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','Select seconds');?></option> |
| 105 | + <?php for ($i = 0; $i <= 59; $i++) : ?> |
| 106 | + <option value="<?php echo $i?>" <?php if (isset($input->timeto_seconds) && $input->timeto_seconds === $i) : ?>selected="selected"<?php endif;?>><?php echo str_pad($i,2, '0', STR_PAD_LEFT);?> s.</option> |
| 107 | + <?php endfor;?> |
| 108 | + </select> |
| 109 | + </div> |
| 110 | + </div> |
| 111 | + </div> |
| 112 | + </div> |
| 113 | + <div class="col-md-12 d-flex align-items-end"> |
| 114 | + <div class="btn-group me-2"> |
| 115 | + <button type="submit" class="btn btn-primary btn-sm" name="doSearch"><span class="material-icons">search</span><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','Search');?></button> |
| 116 | + <a href="<?php echo erLhcoreClassDesign::baseurl('form/downloadcollected')?>/<?php echo $form->id?>" class="btn btn-outline-secondary btn-sm"><span class="material-icons">file_download</span><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','Download XLS');?></a> |
| 117 | + </div> |
| 118 | + </div> |
| 119 | + </div> |
| 120 | + |
| 121 | +</form> |
| 122 | + |
| 123 | +<script> |
| 124 | +$(function() { |
| 125 | + $('#id_timefrom,#id_timeto').fdatepicker({ |
| 126 | + format: 'yyyy-mm-dd' |
| 127 | + }); |
| 128 | + $('.btn-block-department').makeDropdown(); |
| 129 | +}); |
| 130 | +</script> |
0 commit comments