edit.html.php 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. /**
  3. * The edit view file of marketresearch 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 Hu Fangzhou <hufangzhou@easycorp.ltd>
  8. * @package marketresearch
  9. * @link https://www.zentao.net
  10. */
  11. ?>
  12. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  13. <?php include $app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
  14. <?php js::set('longTime', $lang->marketresearch->longTime);?>
  15. <?php js::set('weekend', $config->execution->weekend);?>
  16. <?php js::set('LONG_TIME', LONG_TIME);?>
  17. <?php js::set('researchAcl', $research->acl);?>
  18. <div id="mainContent" class="main-content fade">
  19. <div class="center-block">
  20. <div class="main-header">
  21. <h2><?php echo $lang->marketresearch->edit;?></h2>
  22. </div>
  23. <form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
  24. <table class="table table-form">
  25. <tbody>
  26. <tr>
  27. <th class='w-140px'><?php echo $lang->marketresearch->name;?></th>
  28. <td><?php echo html::input('name', $research->name, "class='form-control'");?></td>
  29. </tr>
  30. <tr>
  31. <th><?php echo $lang->marketresearch->market;?></th>
  32. <td id='marketBox' class='required'><?php echo html::select('market', $marketList, $research->market, "class='form-control picker-select'");?></td>
  33. </tr>
  34. <tr>
  35. <th><?php echo $lang->marketresearch->PM;?></th>
  36. <td><?php echo html::select('PM', $users, $research->PM, "class='form-control picker-select'");?></td>
  37. </tr>
  38. <tr>
  39. <th id="dateRange"><?php echo $lang->marketresearch->dateRange;?></th>
  40. <td>
  41. <div id='dateBox' class='input-group'>
  42. <?php echo html::input('begin', $research->begin, "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->marketresearch->begin . "' required");?>
  43. <span class='input-group-addon'><?php echo $lang->marketresearch->to;?></span>
  44. <?php echo html::input('end', $research->end, "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->marketresearch->end . "' required");?>
  45. </div>
  46. </td>
  47. <?php
  48. /* Remove LONG_TIME item when no multiple project. */
  49. if(empty($research->multiple) && $research->end != LONG_TIME) unset($lang->marketresearch->endList[999]);
  50. $deltaValue = $research->end == LONG_TIME ? 999 : (strtotime($research->end) - strtotime($research->begin)) / 3600 / 24 + 1;
  51. ?>
  52. <td id="endList" colspan='2'><?php echo html::radio('delta', $lang->marketresearch->endList, $deltaValue, "onclick='computeEndDate(this.value)'");?></td>
  53. </tr>
  54. <tr>
  55. <th><?php echo $lang->marketresearch->desc;?></th>
  56. <td colspan='3'><?php echo html::textarea('desc', $research->desc, "class='form-control kindeditor'");?></td>
  57. </tr>
  58. <tr>
  59. <th><?php echo $lang->marketresearch->acl;?></th>
  60. <td colspan='3' class='aclBox'><?php echo nl2br(html::radio('acl', $lang->marketresearch->aclList, $research->acl, "onclick='setWhite(this.value);'", 'block'));?></td>
  61. </tr>
  62. <tr id="whitelistBox">
  63. <th><?php echo $lang->whitelist;?></th>
  64. <td colspan='2'>
  65. <div class='input-group'>
  66. <?php echo html::select('whitelist[]', $users, $research->whitelist, 'class="form-control picker-select" multiple');?>
  67. <?php echo $this->fetch('my', 'buildContactLists', "dropdownName=whitelist");?>
  68. </div>
  69. </td>
  70. </tr>
  71. <tr>
  72. <td class='form-actions text-center' colspan='4'><?php echo html::submitButton() . html::backButton();?></td>
  73. </tr>
  74. </tbody>
  75. </table>
  76. </form>
  77. </div>
  78. </div>
  79. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>