<?php
/**
 * The settings view file of attend module of ZenTaoPMS.
 *
 * @copyright   Copyright 2009-2018 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      chujilu <chujilu@cnezsoft.com>
 * @package     attend
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('date', date('Y-m-d'));?>
<?php if(!$module):?>
<div class='main-row'>
  <?php include 'side.html.php';?>
  <div class='main-col'>
<?php endif;?>
    <div class='panel panel-block'>
      <div class='panel-heading'>
        <strong><?php echo $lang->attend->settings;?></strong>
      </div>
      <div class='panel-body'>
        <form id='ajaxForm' method='post' class="attend-setting">
          <table class='table table-form'>
            <tr>
              <th class='w-120px'><?php echo $lang->attend->beginDate->company;?></th>
              <td class='w-400px'><?php echo html::input('beginDate[company]', $beginDate, "class='form-control form-date'")?></td>
              <td>
                <a data-toggle='tooltip' title='<?php echo $lang->attend->note->beginDate;?>'><i class='icon-help-circle icon-md'></i></a>
              </td>
            </tr>
            <tr>
              <th><?php echo $lang->attend->time;?></th>
              <td>
                <div class='input-group'>
                  <?php echo html::input('signInLimit', $signInLimit, "class='form-control form-time text-center' placeholder='{$lang->attend->manualIn}'")?>
                  <span class='input-group-addon'>~</span>
                  <?php echo html::input('signOutLimit', $signOutLimit, "class='form-control form-time text-center' placeholder='{$lang->attend->manualOut}'")?>
                  <span class='input-group-addon'><?php echo html::checkbox('mustSignOut', array('yes' => $lang->attend->mustSignOut), $mustSignOut);?></span>
                </div>
              </td>
            </tr>
            <tr>
              <th><?php echo $lang->attend->lunch;?></th>
              <td>
                <div class='input-group'>
                <?php echo html::input('lunchBegin', $lunchBegin, "class='form-control form-time text-center'")?>
                <span class='input-group-addon'>~</span>
                <?php echo html::input('lunchEnd', $lunchEnd, "class='form-control form-time text-center'")?>
                </div>
              </td>
            </tr>
            <tr>
              <th><?php echo $lang->attend->dinner;?></th>
              <td>
                <div class='input-group'>
                <?php echo html::input('dinnerBegin', $dinnerBegin, "class='form-control form-time text-center'")?>
                <span class='input-group-addon'>~</span>
                <?php echo html::input('dinnerEnd', $dinnerEnd, "class='form-control form-time text-center'")?>
                </div>
              </td>
            </tr>
            <tr>
              <th><?php echo $lang->attend->workingHours?></th>
              <td><?php echo html::input('workingHours', $workingHours, "class='form-control' readonly")?></td>
              <td></td>
            </tr>
            <tr>
              <th><?php echo $lang->attend->workingDays?></th>
              <td><?php echo html::select('workingDays', $lang->attend->workingDaysList, $workingDays, "class='form-control'")?></td>
              <td></td>
            </tr>
            <tr>
              <th><?php echo $lang->attend->reviewedBy;?></th>
              <td><?php echo html::select('reviewedBy', array('' => $this->lang->dept->moderators) + $users, $reviewedBy, "class='form-control chosen'")?></td>
              <td></td>
            </tr>
            <tr>
              <th><?php echo $lang->attend->ipList;?></th>
              <td>
                <div class='input-group'>
                  <?php echo html::input('ip', $ip, "class='form-control' title='{$lang->attend->note->ip}'");?>
                  <div class='input-group-addon'>
                    <label class="checkbox-inline"><input type="checkbox" id="allip" name="allip" value="1"> <?php echo $lang->attend->note->allip;?></label>
                  </div>
                </div>
              </td>
              <td class='text-warning'><?php echo $lang->attend->note->ip;?></td>
            </tr>
            <tr>
              <th><?php echo $lang->attend->noAttendUsers;?></th>
              <td><?php echo html::select('noAttendUsers[]', $users, $noAttendUsers, "class='form-control chosen' multiple")?></td>
              <td></td>
            </tr>
            <tr>
              <th><?php echo $lang->attend->signInClient;?></th>
              <td><?php echo html::select('signInClient', $lang->attend->clientList, $config->attend->signInClient, "class='form-control'")?></td>
              <td style='padding-left: 10px'>
                <?php echo html::a('javascript:;', "<i class='icon-help-circle icon-md'></i>", "data-original-title='{$lang->attend->note->signInClient}' data-toggle='tooltip' data-placement='right'");?>
              </td>
            </tr>
            <tr>
              <th></th>
              <td colspan='2' class='form-actions'><?php echo html::submitButton();?></td>
            </tr>
          </table>
        </form>
      </div>
    </div>
<?php if(!$module):?>
  </div>
</div>
<?php endif;?>
<?php include '../../common/view/footer.html.php';?>
