createstakeholder.html.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?php
  2. /**
  3. * The create stakeholder view of program module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Chunsheng Wang <chunsheng@cnezsoft.com>
  8. * @package product
  9. * @version $Id: browse.html.php 5096 2013-07-11 07:02:43Z chencongzhi520@gmail.com $
  10. * @link https://www.zentao.net
  11. */
  12. ?>
  13. <?php include '../../common/view/header.html.php';?>
  14. <?php js::set('programID', $programID);?>
  15. <?php $path = str_replace(",{$programID},", ',', "{$program->path}");?>
  16. <div id='mainMenu' class='clearfix'>
  17. <div class='btn-toolbar pull-left'>
  18. <span class='btn btn-link btn-active-text'>
  19. <?php echo html::a($this->createLink('program', 'craetestakeholder', "programID={$programID}"), "<span class='text'> {$lang->program->createStakeholder}</span>");?>
  20. </span>
  21. <div class='input-group space w-200px'>
  22. <span class='input-group-addon'><?php echo $lang->execution->selectDept?></span>
  23. <?php echo html::select('dept', $depts, $dept, "class='form-control chosen' onchange='setDeptUsers(this)' data-placeholder='{$lang->execution->selectDeptTitle}'");?>
  24. </div>
  25. <?php if($program->parent):?>
  26. <?php echo html::a($this->createLink('program', 'createStakeholder', "programID=$programID&dept=&parent=$path"), $lang->program->importStakeholder, '', 'class="btn btn-primary"');?>
  27. <?php endif;?>
  28. </div>
  29. </div>
  30. <div id='mainContent' class='main-content'>
  31. <form class='main-form' method='post' id='teamForm' target='hiddenwin'>
  32. <table class='table table-form'>
  33. <thead>
  34. <tr class='text-center'>
  35. <th><?php echo $lang->team->account;?></th>
  36. <th class="w-90px"> <?php echo $lang->actions;?></th>
  37. </tr>
  38. </thead>
  39. <tbody>
  40. <?php foreach($stakeholders as $stakeholder):?>
  41. <?php if(!isset($users[$stakeholder->account])) continue;?>
  42. <?php unset($users[$stakeholder->account]);?>
  43. <tr>
  44. <td>
  45. <input type='text' name='realnames[]' value='<?php echo $stakeholder->realname;?>' readonly class='form-control' />
  46. <input type='hidden' name='accounts[]' value='<?php echo $stakeholder->account;?>' />
  47. </td>
  48. <td class='c-actions text-center'>
  49. <a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
  50. <a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
  51. </td>
  52. </tr>
  53. <?php endforeach;?>
  54. <?php foreach($parentStakeholders as $stakeholder):?>
  55. <?php if(!isset($users[$stakeholder->account])) continue;?>
  56. <tr>
  57. <td><?php echo html::select("accounts[]", $users, $stakeholder->account, "class='form-control chosen'");?></td>
  58. <td class='c-actions text-center'>
  59. <a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
  60. <a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
  61. </td>
  62. </tr>
  63. <?php endforeach;?>
  64. <?php foreach($deptUsers as $deptAccount => $userName):?>
  65. <?php if(!isset($users[$deptAccount])) continue;?>
  66. <tr class='addedItem'>
  67. <td><?php echo html::select("accounts[]", $users, $deptAccount, "class='form-control chosen'");?></td>
  68. <td class='c-actions text-center'>
  69. <a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
  70. <a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
  71. </td>
  72. </tr>
  73. <?php unset($users[$deptAccount]);?>
  74. <?php endforeach;?>
  75. <?php for($j = 0; $j < 5; $j ++):?>
  76. <tr class='addedItem'>
  77. <td><?php echo html::select("accounts[]", $users, '', "class='form-control chosen'");?></td>
  78. <td class='c-actions text-center'>
  79. <a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
  80. <a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
  81. </td>
  82. </tr>
  83. <?php endfor;?>
  84. </tbody>
  85. <tfoot><tr><td colspan='6' class='form-actions'><?php echo html::submitButton() . ' ' . html::backButton(); ?></td></tr></tfoot>
  86. </table>
  87. </form>
  88. </div>
  89. <div>
  90. <table class='hidden'>
  91. <tr id='addItem' class='hidden'>
  92. <td><?php echo html::select("accounts[]", $users, '', "class='form-control'");?></td>
  93. <td class='c-actions text-center'>
  94. <a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
  95. <a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
  96. </td>
  97. </tr>
  98. </table>
  99. </div>
  100. <?php include '../../common/view/footer.html.php';?>