create.html.php 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?php
  2. /**
  3. * The create view of product module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(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: create.html.php 4129 2013-01-18 01:58:14Z wwccss $
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <?php include $app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
  15. <?php js::set('noProject', false);?>
  16. <?php js::set('programID', $programID);?>
  17. <?php js::set('systemMode', $this->config->systemMode);?>
  18. <?php js::set('manageLinePriv', common::hasPriv('product', 'manageLine'));?>
  19. <div id="mainContent" class="main-content">
  20. <div class="center-block">
  21. <div class="main-header">
  22. <h2><?php echo $lang->product->create;?></h2>
  23. </div>
  24. <form class="load-indicator main-form form-ajax<?php if(defined('TUTORIAL')) echo ' not-watch';?>" id="createForm" method="post" target='hiddenwin'>
  25. <table class="table table-form">
  26. <tbody>
  27. <tr>
  28. <th class='w-140px'><?php echo $lang->program->common;?></th>
  29. <td><?php echo html::select('program', $programs, $programID, "class='form-control chosen' onchange='setParentProgram(this.value)'");?></td><td></td>
  30. </tr>
  31. <tr>
  32. <th class='w-140px'><?php echo $lang->product->line;?></th>
  33. <?php if(common::hasPriv('product', 'manageLine')):?>
  34. <td>
  35. <div class='input-group'>
  36. <?php $checkedNewLine = count($lines) > 1 ? '' : 'checked';?>
  37. <?php echo html::select("line", $lines, '', "class='form-control hidden line-exist chosen'");?>
  38. <?php echo html::input("lineName", '', "class='form-control line-no-exist'");?>
  39. <?php if(count($lines)):?>
  40. <span class='input-group-addon'>
  41. <div class="checkbox-primary">
  42. <input type="checkbox" name="newLine" value="0" <?php echo $checkedNewLine;?> onchange="toggleLine(this)" id="newLine0" />
  43. <label for="newLine0"><?php echo $lang->product->newLine;?></label>
  44. </div>
  45. </span>
  46. <?php endif;?>
  47. </div>
  48. </td>
  49. <?php else:?>
  50. <td><?php echo html::select('line', $lines, '', "class='form-control chosen'");?></td><td></td>
  51. <?php endif;?>
  52. </tr>
  53. <tr>
  54. <th><?php echo $lang->product->name;?></th>
  55. <td><?php echo html::input('name', '', "class='form-control input-product-title' required");?></td><td></td>
  56. </tr>
  57. <?php if(isset($config->setCode) and $config->setCode == 1):?>
  58. <tr>
  59. <th><?php echo $lang->product->code;?></th>
  60. <td><?php echo html::input('code', '', "class='form-control' required");?></td>
  61. </tr>
  62. <?php endif;?>
  63. <tr>
  64. <th><?php echo $lang->product->PO;?></th>
  65. <td><?php echo html::select('PO', $poUsers, $this->app->user->account, "class='form-control chosen'");?></td>
  66. </tr>
  67. <tr>
  68. <th><?php echo $lang->product->PMT;?></th>
  69. <td><?php echo html::select('PMT[]', $users, $app->user->account, "class='form-control picker-select' multiple");?></td>
  70. </tr>
  71. <tr>
  72. <th><?php echo $lang->product->reviewer;?></th>
  73. <td><?php echo html::select('reviewer[]', $users, '', "class='form-control picker-select' multiple");?></td>
  74. </tr>
  75. <tr>
  76. <th><?php echo $lang->product->type;?></th>
  77. <td>
  78. <?php
  79. $proudctTypeList = array();
  80. foreach($lang->product->typeList as $key => $type) $productTypeList[$key] = $type . zget($lang->product->typeTips, $key, '');
  81. ?>
  82. <?php echo html::select('type', $productTypeList, 'normal', "class='form-control'");?>
  83. </td>
  84. <td></td>
  85. </tr>
  86. <tr class='hide'>
  87. <th><?php echo $lang->product->status;?></th>
  88. <td><?php echo html::hidden('status', 'normal');?></td>
  89. <td></td>
  90. </tr>
  91. <?php $this->printExtendFields('', 'table');?>
  92. <tr>
  93. <th><?php echo $lang->product->desc;?></th>
  94. <td colspan='2'>
  95. <?php echo $this->fetch('user', 'ajaxPrintTemplates', "type=product&link=desc");?>
  96. <?php echo html::textarea('desc', '', "rows='8' class='form-control kindeditor' hidefocus='true' tabindex=''");?>
  97. </td>
  98. </tr>
  99. <tr>
  100. <th><?php echo $lang->product->acl;?></th>
  101. <td colspan='2'><?php echo nl2br(html::radio('acl', $lang->product->aclList, 'private', "onclick='setWhite(this.value);'", 'block'));?></td>
  102. </tr>
  103. <tr id="whitelistBox">
  104. <th><?php echo $lang->whitelist;?></th>
  105. <td colspan='1'>
  106. <div class='input-group'>
  107. <?php echo html::select('whitelist[]', $users, '', 'class="form-control picker-select" multiple');?>
  108. <?php echo $this->fetch('my', 'buildContactLists', "dropdownName=whitelist");?>
  109. </div>
  110. </td>
  111. </tr>
  112. <tr>
  113. <td colspan='3' class='text-center form-actions'>
  114. <?php echo html::hidden('status', 'wait');?>
  115. <?php echo html::submitButton();?>
  116. <?php echo $gobackLink ? html::a($gobackLink, $lang->goback, '', 'class="btn btn-wide"') : html::backButton();?>
  117. </td>
  118. </tr>
  119. </tbody>
  120. </table>
  121. </form>
  122. </div>
  123. </div>
  124. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>