formdata.php 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. global $app, $lang;
  3. $config->product->form = new stdclass();
  4. $config->product->form->create = array();
  5. $config->product->form->create['program'] = array('type' => 'int', 'control' => 'select', 'required' => false, 'default' => 0, 'options' => array());
  6. $config->product->form->create['line'] = array('type' => 'int', 'control' => 'select', 'required' => false, 'default' => '', 'options' => array());
  7. $config->product->form->create['name'] = array('type' => 'string', 'control' => 'text', 'required' => true, 'filter' => 'trim');
  8. $config->product->form->create['code'] = array('type' => 'string', 'control' => 'text', 'required' => false, 'filter' => 'trim');
  9. $config->product->form->create['PO'] = array('type' => 'account', 'control' => 'select', 'required' => false, 'default' => '', 'options' => array());
  10. $config->product->form->create['QD'] = array('type' => 'account', 'control' => 'select', 'required' => false, 'default' => '', 'options' => array());
  11. $config->product->form->create['RD'] = array('type' => 'account', 'control' => 'select', 'required' => false, 'default' => '', 'options' => array());
  12. $config->product->form->create['reviewer'] = array('type' => 'array', 'control' => 'multi-select', 'required' => false, 'default' => '', 'filter' => 'join', 'options' => 'users');
  13. $config->product->form->create['PMT'] = array('type' => 'array', 'control' => 'multi-select', 'required' => false, 'default' => '', 'filter' => 'join', 'options' => 'users');
  14. $config->product->form->create['type'] = array('type' => 'string', 'control' => 'select', 'required' => false, 'default' => 'normal', 'options' => $lang->product->typeList);
  15. $config->product->form->create['status'] = array('type' => 'string', 'control' => 'hidden', 'required' => false, 'default' => 'normal');
  16. $config->product->form->create['desc'] = array('type' => 'string', 'control' => 'editor', 'required' => false, 'default' => '', 'width' => 'full');
  17. $config->product->form->create['acl'] = array('type' => 'string', 'control' => 'radio', 'required' => false, 'default' => 'open', 'width' => 'full', 'options' => $lang->product->aclList);
  18. $config->product->form->create['groups'] = array('type' => 'array', 'control' => 'multi-select', 'required' => false, 'default' => '', 'filter' => 'join', 'width' => 'full', 'options' => array());
  19. $config->product->form->create['whitelist'] = array('type' => 'array', 'control' => 'multi-select', 'required' => false, 'default' => '', 'filter' => 'join', 'width' => 'full', 'options' => 'users');
  20. $config->product->form->create['createdBy'] = array('type' => 'account', 'control' => '', 'required' => false, 'default' => (isset($app->user) && isset($app->user->account)) ? $app->user->account : '');
  21. $config->product->form->create['createdDate'] = array('type' => 'string', 'control' => '', 'required' => false, 'default' => helper::now());
  22. $config->product->form->create['createdVersion'] = array('type' => 'string', 'control' => '', 'required' => false, 'default' => $config->version);
  23. $config->product->form->edit = array();
  24. $config->product->form->edit['program'] = array('type' => 'int', 'control' => 'select', 'required' => false, 'default' => 0, 'options' => array());
  25. $config->product->form->edit['line'] = array('type' => 'int', 'control' => 'select', 'required' => false, 'default' => 0, 'options' => array());
  26. $config->product->form->edit['name'] = array('type' => 'string', 'control' => 'text', 'required' => true, 'filter' => 'trim');
  27. $config->product->form->edit['code'] = array('type' => 'string', 'control' => 'text', 'required' => false, 'filter' => 'trim');
  28. $config->product->form->edit['PO'] = array('type' => 'account', 'control' => 'select', 'required' => false, 'default' => '', 'options' => array());
  29. $config->product->form->edit['QD'] = array('type' => 'account', 'control' => 'select', 'required' => false, 'default' => '', 'options' => array());
  30. $config->product->form->edit['RD'] = array('type' => 'account', 'control' => 'select', 'required' => false, 'default' => '', 'options' => array());
  31. $config->product->form->edit['PMT'] = array('type' => 'array', 'control' => 'multi-select', 'required' => false, 'default' => '', 'filter' => 'join', 'options' => 'users');
  32. $config->product->form->edit['reviewer'] = array('type' => 'array', 'control' => 'multi-select', 'required' => false, 'default' => '', 'filter' => 'join', 'options' => 'users');
  33. $config->product->form->edit['type'] = array('type' => 'string', 'control' => 'select', 'required' => false, 'default' => 'normal', 'options' => $lang->product->typeList);
  34. $config->product->form->edit['status'] = array('type' => 'string', 'control' => 'select', 'required' => false, 'default' => 'normal', 'options' => $lang->product->statusList);
  35. $config->product->form->edit['desc'] = array('type' => 'string', 'control' => 'editor', 'required' => false, 'default' => '', 'width' => 'full');
  36. $config->product->form->edit['acl'] = array('type' => 'string', 'control' => 'radio', 'required' => false, 'default' => 'private', 'width' => 'full', 'options' => $lang->product->aclList);
  37. $config->product->form->edit['groups'] = array('type' => 'array', 'control' => 'multi-select', 'required' => false, 'default' => '', 'filter' => 'join', 'width' => 'full', 'options' => array());
  38. $config->product->form->edit['whitelist'] = array('type' => 'array', 'control' => 'multi-select', 'required' => false, 'default' => '', 'width' => 'full', 'filter' => 'join', 'options' => 'users');
  39. $config->product->form->batchEdit = array();
  40. $config->product->form->batchEdit['program'] = array('type' => 'int', 'control' => 'select', 'width' => '200px', 'required' => false, 'default' => 0, 'options' => array());
  41. $config->product->form->batchEdit['name'] = array('type' => 'string', 'control' => 'text', 'width' => '240px', 'required' => true, 'base' => true);
  42. $config->product->form->batchEdit['line'] = array('type' => 'int', 'control' => 'select', 'width' => '200px', 'required' => false, 'default' => 0, 'options' => array());
  43. $config->product->form->batchEdit['PO'] = array('type' => 'string', 'control' => 'select', 'width' => '128px', 'required' => false, 'default' => '', 'options' => 'users');
  44. $config->product->form->batchEdit['QD'] = array('type' => 'string', 'control' => 'select', 'width' => '128px', 'required' => false, 'default' => '', 'options' => 'users');
  45. $config->product->form->batchEdit['RD'] = array('type' => 'string', 'control' => 'select', 'width' => '128px', 'required' => false, 'default' => '', 'options' => 'users');
  46. $config->product->form->batchEdit['type'] = array('type' => 'string', 'control' => 'select', 'width' => '128px', 'required' => false, 'default' => 'normal', 'options' => $lang->product->typeList);
  47. $config->product->form->batchEdit['status'] = array('type' => 'string', 'control' => 'select', 'width' => '128px', 'required' => false, 'default' => 'normal', 'options' => $lang->product->statusList);
  48. $config->product->form->batchEdit['acl'] = array('type' => 'string', 'control' => 'radioList', 'width' => '120px', 'required' => false, 'default' => 'private', 'options' => $lang->product->abbr->aclList);
  49. $config->product->form->close = array();
  50. $config->product->form->close['status'] = array('type' => 'string', 'control' => 'hidden', 'required' => false, 'default' => 'close');
  51. $config->product->form->close['closedDate'] = array('type' => 'string', 'control' => 'hidden', 'required' => false, 'default' => helper::now());
  52. $config->product->form->activate = array();
  53. $config->product->form->activate['status'] = array('type' => 'string', 'control' => 'hidden', 'required' => false, 'default' => 'normal');
  54. $config->product->form->manageLine = array();
  55. $config->product->form->manageLine['products'] = array('type' => 'array', 'control' => 'text', 'required' => false, 'default' => '');
  56. $config->product->form->manageLine['programs'] = array('type' => 'array', 'control' => 'text', 'required' => false, 'default' => '');
  57. $config->product->form->manageLine['modules'] = array('type' => 'array', 'control' => 'text', 'required' => false, 'default' => '');
  58. if(empty($config->setCode))
  59. {
  60. unset($config->product->form->create['code']);
  61. unset($config->product->form->edit['code']);
  62. }
  63. if($config->edition != 'ipd')
  64. {
  65. unset($config->product->form->create['PMT']);
  66. unset($config->product->form->edit['PMT']);
  67. }
  68. if($config->systemMode != 'ALM' && $config->systemMode != 'PLM')
  69. {
  70. unset($config->product->form->create['line']);
  71. unset($config->product->form->edit['line']);
  72. }
  73. if(($config->systemMode != 'ALM' && $config->systemMode != 'PLM') || !helper::hasFeature('program'))
  74. {
  75. unset($config->product->form->create['program']);
  76. unset($config->product->form->edit['program']);
  77. unset($config->product->form->batchEdit['program']);
  78. }