form.php 5.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. $config->project->form = new stdclass();
  3. $config->project->form->create = array();
  4. $config->project->form->edit = array();
  5. $config->project->form->batchedit = array();
  6. $config->project->form->close = array();
  7. $config->project->form->start = array();
  8. $config->project->form->suspend = array();
  9. $config->project->form->activate = array();
  10. $config->project->form->manageProducts = array();
  11. $config->project->form->create['parent'] = array('type' => 'int', 'required' => false, 'default' => 0);
  12. $config->project->form->create['name'] = array('type' => 'string', 'required' => true, 'filter' => 'trim');
  13. $config->project->form->create['multiple'] = array('type' => 'string', 'required' => false);
  14. $config->project->form->create['hasProduct'] = array('type' => 'string', 'required' => false, 'default' => '0');
  15. $config->project->form->create['stageBy'] = array('type' => 'string', 'required' => false, 'default' => 'product');
  16. $config->project->form->create['PM'] = array('type' => 'string', 'required' => false, 'default' => '');
  17. $config->project->form->create['budget'] = array('type' => 'float', 'required' => false, 'default' => '');
  18. $config->project->form->create['budgetUnit'] = array('type' => 'string', 'required' => false, 'default' => 'CNY');
  19. $config->project->form->create['begin'] = array('type' => 'date', 'required' => true);
  20. $config->project->form->create['end'] = array('type' => 'date', 'required' => false, 'default' => null);
  21. $config->project->form->create['days'] = array('type' => 'int', 'required' => false, 'default' => 0);
  22. $config->project->form->create['desc'] = array('type' => 'string', 'required' => false, 'default' => '', 'control' => 'editor');
  23. $config->project->form->create['acl'] = array('type' => 'string', 'required' => false, 'default' => '');
  24. $config->project->form->create['whitelist'] = array('type' => 'array', 'required' => false, 'default' => '');
  25. $config->project->form->create['auth'] = array('type' => 'array', 'required' => false, 'default' => '');
  26. $config->project->form->create['taskDateLimit'] = array('type' => 'string', 'required' => false, 'default' => '');
  27. $config->project->form->create['storyType'] = array('type' => 'array', 'required' => false, 'default' => '');
  28. $config->project->form->create['model'] = array('type' => 'string', 'required' => false, 'default' => '');
  29. $config->project->form->create['vision'] = array('type' => 'string', 'required' => false, 'default' => $config->vision);
  30. if(isset($this->config->setCode) && $this->config->setCode == 1) $config->project->form->create['code'] = array('type' => 'string', 'required' => false, 'filter' => 'trim');
  31. $config->project->form->edit = $config->project->form->create;
  32. $config->project->form->edit['products'] = array('type' => 'array', 'required' => false, 'default' => array());
  33. $config->project->form->edit['branch'] = array('type' => 'array', 'required' => false, 'default' => array());
  34. $config->project->form->edit['plans'] = array('type' => 'array', 'required' => false, 'default' => array());
  35. $config->project->form->edit['taskDateLimit'] = array('type' => 'string', 'required' => false, 'default' => '');
  36. $config->project->form->edit['coverExecutionPriv'] = array('type' => 'int', 'required' => false, 'default' => '1');
  37. unset($config->project->form->edit['hasProduct']);
  38. unset($config->project->form->edit['stageBy']);
  39. unset($config->project->form->edit['multiple']);
  40. $config->project->form->start['realBegan'] = array('type' => 'date', 'required' => true, 'filter' => 'trim');
  41. $config->project->form->close['realEnd'] = array('type' => 'date', 'required' => true, 'filter' => 'trim');
  42. $config->project->form->activate['begin'] = array('type' => 'date', 'required' => true);
  43. $config->project->form->activate['end'] = array('type' => 'date', 'required' => true);
  44. $config->project->form->activate['readjustTime'] = array('type' => 'int', 'required' => false, 'default' => '');
  45. $config->project->form->activate['readjustTask'] = array('type' => 'array', 'required' => false, 'default' => '');
  46. $config->project->form->batchedit['id'] = array('type' => 'int', 'required' => false, 'base' => true);
  47. $config->project->form->batchedit['parent'] = array('type' => 'int', 'required' => false);
  48. $config->project->form->batchedit['name'] = array('type' => 'string', 'required' => true, 'filter' => 'trim');
  49. $config->project->form->batchedit['PM'] = array('type' => 'string', 'required' => false);
  50. $config->project->form->batchedit['begin'] = array('type' => 'date', 'required' => true);
  51. $config->project->form->batchedit['end'] = array('type' => 'date', 'required' => true);
  52. $config->project->form->batchedit['days'] = array('type' => 'int', 'required' => false);
  53. $config->project->form->batchedit['acl'] = array('type' => 'string', 'required' => false);
  54. if(isset($config->setCode) and $config->setCode == 1) $config->project->form->batchedit['code'] = array('type' => 'string', 'required' => false, 'filter' => 'trim');
  55. $config->project->form->manageMembers['account'] = array('type' => 'string', 'required' => false, 'base' => true);
  56. $config->project->form->manageMembers['role'] = array('type' => 'string', 'required' => false, 'filter' => 'trim');
  57. $config->project->form->manageMembers['days'] = array('type' => 'int', 'required' => false);
  58. $config->project->form->manageMembers['hours'] = array('type' => 'float', 'required' => false);
  59. $config->project->form->manageMembers['limited'] = array('type' => 'date', 'required' => false);