<?php
/**
 * The create view file of user module of XXB.
 *
 * @copyright   Copyright 2009-2023 禅道软件（青岛）有限公司(ZenTao Software (Qingdao) Co., Ltd., www.zentao.net)
 * @license     ZOSL (https://zpl.pub/page/zoslv1.html)
 * @author      Chunsheng Wang <chunsheng@cnezsoft.com>
 * @package     user
 * @version     $Id: create.html.php 4029 2016-08-26 06:50:41Z liugang $
 * @link        https://xuanim.com
 */
?>
<?php
include '../../common/view/header.html.php';
include '../../common/view/treeview.html.php';
include '../../common/view/chosen.html.php';
?>
<div class="col-md-12">
  <?php include './deptside.html.php';?>
  <div class='col-md-10'>
    <div class="panel">
      <div class="panel-heading">
        <strong><i class="icon-plus"></i> <?php echo $lang->user->create;?></strong>
      </div>
      <div class='panel-body'>
        <form method='post' id='ajaxForm'>
          <table class='table table-form'>
            <tr>
              <th class='w-100px'><?php echo $lang->user->account;?></th>
              <td class='w-p40'><?php echo html::input('account', '', "class='form-control' autocomplete='off'" . ($exceedUserLimit ? ' disabled' : ''));?></td>
            </tr>
            <tr>
              <th><?php echo $lang->user->realname;?></th>
              <td><?php echo html::input('realname', '', "class='form-control' autocomplete='off'" . ($exceedUserLimit ? ' disabled' : ''));?></td>
            </tr>
            <tr>
              <th><?php echo $lang->user->gender;?></th>
              <td><?php unset($lang->user->genderList->u); echo html::radio('gender', $lang->user->genderList, '', ($exceedUserLimit ? ' disabled' : ''));?></td>
            </tr>
            <tr>
              <th><?php echo $lang->user->dept;?></th>
              <td><?php echo html::select('dept', $depts, '', "class='chosen form-control'" . ($exceedUserLimit ? ' disabled' : ''));?></td>
            </tr>
            <tr>
              <th><?php echo $lang->user->role;?></th>
              <td><?php echo html::select('role', $lang->user->roleList, '', "class='form-control'" . ($exceedUserLimit ? ' disabled' : ''));?></td>
              <td></td>
            </tr>
            <tr>
              <th><?php echo $lang->user->password;?></th>
              <td>
                <div class='required required-wrapper'></div>
                <?php echo html::password('password1', '', "class='form-control' autocomplete='off'" . ($exceedUserLimit ? ' disabled' : ''))?>
              </td>
              <td></td>
            </tr>
            <tr>
              <th><?php echo $lang->user->password2;?></th>
              <td>
                <div class='required required-wrapper'></div>
                <?php echo html::password('password2', '', "class='form-control' autocomplete='off'" . ($exceedUserLimit ? ' disabled' : ''));?>
              </td>
              <td></td>
            </tr>
            <tr>
              <th><?php echo $lang->user->email;?></th>
              <td><?php echo html::input('email', '', "class='form-control' autocomplete='off'" . ($exceedUserLimit ? ' disabled' : ''));?></td>
              <td></td>
            </tr>
            <tr>
              <th><?php echo $lang->user->mobile;?></th>
              <td><?php echo html::input('mobile', '', "class='form-control' autocomplete='off'" . ($exceedUserLimit ? ' disabled' : ''));?></td>
              <td></td>
            </tr>
            <tr>
              <th><?php echo $lang->user->phone;?></th>
              <td><?php echo html::input('phone', '', "class='form-control' autocomplete='off'" . ($exceedUserLimit ? ' disabled' : ''));?></td>
              <td></td>
            </tr>
            <tr>
              <th></th>
              <td>
                <?php if($exceedUserLimit) { ?>
                  <div class="alert alert-danger"><?php echo $lang->user->exceedUserLimit; echo html::a($lang->user->licenseDocsUrl, $lang->user->learnMore, 'target="_blank"') ?></div>
                <?php } else echo html::submitButton(); ?>
              </td>
              <td></td>
            </tr>
          </table>
        </form>
      </div>
    </div>
  </div>
</div>
<?php include '../../common/view/footer.html.php';?>
