form.php 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /* Batch stages creation. */
  3. global $app, $lang;
  4. $app->loadLang('execution');
  5. $app->loadLang('stage');
  6. $config->programplan->form = new stdClass();
  7. $config->programplan->form->create = array();
  8. $config->programplan->form->create['enabled'] = array('label' => $lang->programplan->enabled, 'type' => 'string', 'control' => array('control' => 'switcher', 'checked' => true), 'options' => $lang->programplan->enabledList);
  9. $config->programplan->form->create['id'] = array('label' => '', 'type' => 'int', 'control' => 'text', 'required' => false, 'default' => 0);
  10. $config->programplan->form->create['order'] = array('label' => '', 'type' => 'int', 'control' => 'text', 'required' => false, 'default' => 0);
  11. $config->programplan->form->create['name'] = array('label' => $lang->nameAB, 'type' => 'string', 'control' => 'text', 'required' => true, 'default' => '', 'base' => true, 'filter' => 'trim');
  12. $config->programplan->form->create['code'] = array('label' => $lang->code, 'type' => 'string', 'control' => 'text', 'required' => false, 'default' => '', 'filter' => 'trim');
  13. $config->programplan->form->create['PM'] = array('label' => $lang->programplan->PMAB, 'type' => 'string', 'control' => 'picker', 'required' => false, 'default' => '', 'options' => '');
  14. if(!empty($config->setPercent)) $config->programplan->form->create['percent'] = array('label' => $lang->programplan->percent, 'type' => 'string', 'control' => 'text', 'required' => false, 'default' => '');
  15. $config->programplan->form->create['attribute'] = array('label' => $lang->programplan->attribute, 'type' => 'string', 'control' => 'picker', 'required' => false, 'default' => 0, 'options' => $lang->stage->typeList);
  16. $config->programplan->form->create['type'] = array('label' => $lang->execution->method, 'type' => 'string', 'control' => 'picker', 'required' => true, 'default' => 'stage', 'options' => $lang->execution->typeList);
  17. $config->programplan->form->create['point'] = array('label' => $lang->programplan->point, 'type' => 'array', 'control' => 'picker', 'required' => false, 'default' => '', 'options' => array(''), 'multiple' => true);
  18. $config->programplan->form->create['parallel'] = array('label' => '', 'type' => 'int', 'control' => 'hidden', 'required' => false, 'default' => 0);
  19. $config->programplan->form->create['acl'] = array('label' => $lang->programplan->acl, 'type' => 'string', 'control' => 'picker', 'required' => false, 'default' => 'open', 'options' => $lang->execution->aclList);
  20. $config->programplan->form->create['begin'] = array('label' => $lang->programplan->begin, 'type' => 'date', 'control' => 'date', 'required' => true, 'default' => null, 'skipRequired' => array('enabled' => 'off'));
  21. $config->programplan->form->create['end'] = array('label' => $lang->programplan->end, 'type' => 'date', 'control' => 'date', 'required' => true, 'default' => null, 'skipRequired' => array('enabled' => 'off'));
  22. $config->programplan->form->create['realBegan'] = array('label' => $lang->programplan->realBegan, 'type' => 'date', 'control' => 'date', 'required' => false, 'default' => null);
  23. $config->programplan->form->create['realEnd'] = array('label' => $lang->programplan->realEnd, 'type' => 'date', 'control' => 'date', 'required' => false, 'default' => null);
  24. $config->programplan->form->create['milestone'] = array('label' => $lang->programplan->milestone, 'type' => 'int', 'control' => 'radioList','required' => false, 'default' => 0, 'options' => $lang->programplan->milestoneList);
  25. $config->programplan->form->create['desc'] = array('label' => $lang->programplan->desc, 'type' => 'string', 'control' => 'textarea', 'required' => false, 'default' => '', 'filter' => 'trim');
  26. $config->programplan->form->create['output'] = array('label' => '', 'type' => 'string', 'control' => 'text', 'required' => false, 'default' => '');
  27. $config->programplan->form->create['level'] = array('label' => '', 'type' => 'string', 'control' => 'text', 'required' => false, 'default' => 0);
  28. $config->programplan->form->create['syncData'] = array('label' => '', 'type' => 'string', 'control' => 'text', 'required' => false, 'default' => 0);
  29. $config->programplan->form->create['defaultPoint'] = array('label' => '', 'type' => 'array', 'control' => 'picker', 'required' => false, 'default' => '', 'options' => array(''), 'multiple' => true);
  30. $config->programplan->form->edit = array();
  31. $config->programplan->form->edit['parent'] = array('required' => false, 'type' => 'int', 'default' => 0);
  32. $config->programplan->form->edit['name'] = array('required' => true, 'type' => 'string', 'default' => '');
  33. $config->programplan->form->edit['code'] = array('required' => false, 'type' => 'string', 'default' => '');
  34. $config->programplan->form->edit['PM'] = array('required' => false, 'type' => 'string', 'default' => '');
  35. $config->programplan->form->edit['percent'] = array('required' => false, 'type' => 'string', 'default' => '');
  36. $config->programplan->form->edit['attribute'] = array('required' => false, 'type' => 'string', 'default' => '');
  37. $config->programplan->form->edit['acl'] = array('required' => false, 'type' => 'string', 'default' => '');
  38. $config->programplan->form->edit['begin'] = array('required' => true, 'type' => 'string', 'default' => null);
  39. $config->programplan->form->edit['end'] = array('required' => true, 'type' => 'string', 'default' => null);
  40. $config->programplan->form->edit['realBegan'] = array('required' => false, 'type' => 'string', 'default' => null);
  41. $config->programplan->form->edit['realEnd'] = array('required' => false, 'type' => 'string', 'default' => null);
  42. $config->programplan->form->edit['milestone'] = array('required' => false, 'type' => 'int', 'default' => 0);
  43. $config->programplan->form->edit['output'] = array('required' => false, 'type' => 'array', 'default' => array(), 'filter' => 'join');
  44. $config->programplan->form->ajaxCustom = array();
  45. $config->programplan->form->ajaxCustom['zooming'] = array('required' => false, 'type' => 'string', 'default' => '');
  46. $config->programplan->form->ajaxCustom['stageCustom'] = array('required' => false, 'type' => 'array', 'filter' => 'join', 'default' => 'array()');
  47. $config->programplan->form->ajaxCustom['ganttFields'] = array('required' => false, 'type' => 'array', 'filter' => 'join', 'default' => 'array()');
  48. $config->programplan->form->updateDateByGantt['id'] = array('required' => false, 'type' => 'int', 'default' => 0);
  49. $config->programplan->form->updateDateByGantt['startDate'] = array('required' => false, 'type' => 'string', 'default' => null);
  50. $config->programplan->form->updateDateByGantt['endDate'] = array('required' => false, 'type' => 'string', 'default' => '');
  51. $config->programplan->form->updateDateByGantt['type'] = array('required' => false, 'type' => 'string', 'default' => '');
  52. $config->programplan->form->updateTaskOrderByGantt['id'] = array('required' => false, 'type' => 'string', 'default' => '');
  53. $config->programplan->form->updateTaskOrderByGantt['tasks'] = array('required' => false, 'type' => 'array', 'default' => array());
  54. if(empty($config->setCode))
  55. {
  56. unset($config->programplan->form->create['code']);
  57. unset($config->programplan->form->edit['code']);
  58. }