form.php 19 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. global $lang,$config,$app;
  3. $isEn = $app->getClientLang() == 'en';
  4. $config->ticket->form = new stdclass();
  5. $config->ticket->form->create = array();
  6. $config->ticket->form->create['product'] = array('name' => 'product', 'label' => $lang->ticket->product, 'width' => '200px', 'control' => array('control' => 'picker', 'required' => true), 'required' => true, 'type' => 'int', 'default' => 0);
  7. $config->ticket->form->create['module'] = array('name' => 'module', 'label' => $lang->ticket->module, 'width' => '200px', 'control' => array('control' => 'picker', 'required' => true), 'required' => false, 'type' => 'int', 'default' => 0);
  8. $config->ticket->form->create['title'] = array('name' => 'title', 'label' => $lang->ticket->title, 'width' => '200px', 'control' => 'input', 'required' => true, 'type' => 'string', 'default' => '');
  9. $config->ticket->form->create['type'] = array('name' => 'type', 'label' => $lang->ticket->type, 'width' => '200px', 'control' => array('control' => 'picker', 'required' => true), 'required' => false, 'type' => 'string', 'default' => '', 'items' => $lang->ticket->typeList);
  10. $config->ticket->form->create['assignedTo'] = array('name' => 'assignedTo', 'label' => $lang->ticket->assignedTo, 'width' => '150px', 'control' => 'picker', 'required' => false, 'type' => 'string', 'default' => '');
  11. $config->ticket->form->create['pri'] = array('name' => 'pri', 'label' => $lang->ticket->pri, 'width' => '100px', 'control' => array('control' => 'priPicker', 'required' => true), 'required' => false, 'type' => 'int', 'default' => 3, 'value' => 3, 'items' => $lang->ticket->priList);
  12. $config->ticket->form->create['estimate'] = array('name' => 'estimate', 'label' => $lang->ticket->estimate, 'width' => '100px', 'control' => 'input', 'required' => false, 'type' => 'float', 'default' => 0);
  13. $config->ticket->form->create['desc'] = array('name' => 'desc', 'label' => $lang->ticket->desc, 'width' => '200px', 'control' => 'editor', 'required' => false, 'type' => 'string', 'default' => '');
  14. $config->ticket->form->create['openedBuild'] = array('name' => 'openedBuild', 'label' => $lang->ticket->openedBuild, 'width' => '150px', 'control' => 'picker', 'required' => false, 'type' => 'array', 'default' => array(''), 'multiple' => true, 'filter' => 'join');
  15. $config->ticket->form->create['deadline'] = array('name' => 'deadline', 'label' => $lang->ticket->deadline, 'width' => '120px', 'control' => 'datePicker', 'required' => false, 'type' => 'date', 'default' => null);
  16. $config->ticket->form->create['keywords'] = array('name' => 'keywords', 'label' => $lang->ticket->keywords, 'width' => '160px', 'control' => 'text', 'required' => false, 'type' => 'string', 'default' => '');
  17. $config->ticket->form->create['mailto'] = array('name' => 'mailto', 'label' => $lang->ticket->mailto, 'width' => '200px', 'control' => 'picker', 'required' => false, 'type' => 'array', 'default' => array(''), 'multiple' => true, 'filter' => 'join');
  18. $config->ticket->form->create['resolution'] = array('name' => 'resolution', 'label' => $lang->ticket->resolution, 'width' => '300px', 'control' => 'editor', 'required' => false, 'type' => 'text', 'default' => '');
  19. $config->ticket->form->edit = array();
  20. $config->ticket->form->edit['product'] = array('name' => 'product', 'label' => $lang->ticket->product, 'width' => '200px', 'control' => array('control' => 'picker', 'required' => true), 'required' => false, 'type' => 'int', 'default' => 0);
  21. $config->ticket->form->edit['module'] = array('name' => 'module', 'label' => $lang->ticket->module, 'width' => '200px', 'control' => array('control' => 'picker', 'required' => true), 'required' => false, 'type' => 'int', 'default' => 0);
  22. $config->ticket->form->edit['title'] = array('name' => 'title', 'label' => $lang->ticket->title, 'width' => '200px', 'control' => 'input', 'required' => true, 'type' => 'string', 'default' => '');
  23. $config->ticket->form->edit['type'] = array('name' => 'type', 'label' => $lang->ticket->type, 'width' => '200px', 'control' => array('control' => 'picker', 'required' => true), 'required' => false, 'type' => 'string', 'default' => '', 'items' => $lang->ticket->typeList);
  24. $config->ticket->form->edit['assignedTo'] = array('name' => 'assignedTo', 'label' => $lang->ticket->assignedTo, 'width' => '150px', 'control' => 'picker', 'required' => false, 'type' => 'string', 'default' => '');
  25. $config->ticket->form->edit['pri'] = array('name' => 'pri', 'label' => $lang->ticket->pri, 'width' => '100px', 'control' => array('control' => 'priPicker', 'required' => true), 'required' => false, 'type' => 'int', 'default' => 3, 'value' => 3, 'items' => $lang->ticket->priList);
  26. $config->ticket->form->edit['estimate'] = array('name' => 'estimate', 'label' => $lang->ticket->estimate, 'width' => '100px', 'control' => 'input', 'required' => false, 'type' => 'float', 'default' => 0);
  27. $config->ticket->form->edit['desc'] = array('name' => 'desc', 'label' => $lang->ticket->desc, 'width' => '200px', 'control' => 'editor', 'required' => false, 'type' => 'string', 'default' => '');
  28. $config->ticket->form->edit['openedBuild'] = array('name' => 'openedBuild', 'label' => $lang->ticket->openedBuild, 'width' => '150px', 'control' => 'picker', 'required' => false, 'type' => 'array', 'default' => array(''), 'multiple' => true, 'filter' => 'join');
  29. $config->ticket->form->edit['deadline'] = array('name' => 'deadline', 'label' => $lang->ticket->deadline, 'width' => '120px', 'control' => 'datePicker', 'required' => false, 'type' => 'date', 'default' => null);
  30. $config->ticket->form->edit['keywords'] = array('name' => 'keywords', 'label' => $lang->ticket->keywords, 'width' => '160px', 'control' => 'text', 'required' => false, 'type' => 'string', 'default' => '');
  31. $config->ticket->form->edit['mailto'] = array('name' => 'mailto', 'label' => $lang->ticket->mailto, 'width' => '200px', 'control' => 'picker', 'required' => false, 'type' => 'string', 'default' => '');
  32. $config->ticket->form->edit['startedBy'] = array('name' => 'startedBy', 'label' => $lang->ticket->startedBy, 'width' => '300px', 'control' => 'picker', 'required' => false, 'type' => 'string', 'default' => '');
  33. $config->ticket->form->edit['startedDate'] = array('name' => 'startedDate', 'label' => $lang->ticket->startedDate, 'width' => '300px', 'control' => 'datePicker', 'required' => false, 'type' => 'date', 'default' => null);
  34. $config->ticket->form->edit['resolvedBy'] = array('name' => 'resolvedBy', 'label' => $lang->ticket->resolvedBy, 'width' => '300px', 'control' => 'picker', 'required' => false, 'type' => 'string', 'default' => '');
  35. $config->ticket->form->edit['resolvedDate'] = array('name' => 'resolvedDate', 'label' => $lang->ticket->resolvedDate, 'width' => '300px', 'control' => 'datePicker', 'required' => false, 'type' => 'date', 'default' => null);
  36. $config->ticket->form->edit['resolution'] = array('name' => 'resolution', 'label' => $lang->ticket->resolution, 'width' => '300px', 'control' => 'editor', 'required' => false, 'type' => 'text', 'default' => '');
  37. $config->ticket->form->edit['editedBy'] = array('name' => 'editedBy', 'label' => $lang->ticket->editedBy, 'width' => '300px', 'control' => 'picker', 'required' => false, 'type' => 'string', 'default' => '');
  38. $config->ticket->form->edit['deleteFiles'] = array('required' => false, 'type' => 'array', 'default' => array());
  39. $config->ticket->form->batchCreate = array();
  40. $config->ticket->form->batchCreate['id'] = array('name' => 'id', 'label' => $lang->idAB, 'width' => '50px', 'control' => 'index', 'required' => false, 'type' => 'int');
  41. $config->ticket->form->batchCreate['module'] = array('name' => 'module', 'label' => $lang->ticket->module, 'width' => '200px', 'control' => array('control' => 'picker', 'required' => true), 'required' => false, 'type' => 'int', 'ditto' => true, 'default' => 0);
  42. $config->ticket->form->batchCreate['title'] = array('name' => 'title', 'label' => $lang->ticket->title, 'width' => '200px', 'control' => 'input', 'required' => true, 'type' => 'string', 'ditto' => false, 'default' => '', 'base' => true);
  43. $config->ticket->form->batchCreate['type'] = array('name' => 'type', 'label' => $lang->ticket->type, 'width' => '200px', 'control' => array('control' => 'picker', 'required' => true), 'required' => false, 'type' => 'string', 'ditto' => true, 'default' => '', 'items' => $lang->ticket->typeList);
  44. $config->ticket->form->batchCreate['assignedTo'] = array('name' => 'assignedTo', 'label' => $lang->ticket->assignedTo, 'width' => '150px', 'control' => 'picker', 'required' => false, 'type' => 'string', 'ditto' => true, 'default' => '');
  45. $config->ticket->form->batchCreate['pri'] = array('name' => 'pri', 'label' => $lang->ticket->pri, 'width' => '100px', 'control' => array('control' => 'priPicker', 'required' => true), 'required' => false, 'type' => 'int', 'ditto' => true, 'default' => 3, 'value' => 3, 'items' => $lang->ticket->priList);
  46. $config->ticket->form->batchCreate['estimate'] = array('name' => 'estimate', 'label' => $lang->ticket->estimate, 'width' => '100px', 'control' => 'input', 'required' => false, 'type' => 'float', 'ditto' => false, 'default' => 0);
  47. $config->ticket->form->batchCreate['desc'] = array('name' => 'desc', 'label' => $lang->ticket->desc, 'width' => '200px', 'control' => 'textarea', 'required' => false, 'type' => 'string', 'ditto' => false, 'default' => '');
  48. $config->ticket->form->batchCreate['openedBuild'] = array('name' => 'openedBuild', 'label' => $lang->ticket->openedBuild, 'width' => '150px', 'control' => 'picker', 'required' => false, 'type' => 'array', 'ditto' => true, 'default' => array(''), 'multiple' => true, 'filter' => 'join');
  49. $config->ticket->form->batchCreate['deadline'] = array('name' => 'deadline', 'label' => $lang->ticket->deadline, 'width' => '120px', 'control' => 'datePicker', 'required' => false, 'type' => 'date', 'ditto' => true, 'default' => null);
  50. $config->ticket->form->batchCreate['customer'] = array('name' => 'customer', 'label' => $lang->ticket->customer, 'width' => '160px', 'control' => 'text', 'required' => false, 'type' => 'string', 'ditto' => false, 'default' => '');
  51. $config->ticket->form->batchCreate['contact'] = array('name' => 'contact', 'label' => $lang->ticket->contact, 'width' => '160px', 'control' => 'text', 'required' => false, 'type' => 'string', 'ditto' => false, 'default' => '');
  52. $config->ticket->form->batchCreate['notifyEmail'] = array('name' => 'notifyEmail', 'label' => $lang->ticket->notifyEmail, 'width' => '160px', 'control' => 'text', 'required' => false, 'type' => 'string', 'ditto' => false, 'default' => '');
  53. $config->ticket->form->batchCreate['keywords'] = array('name' => 'keywords', 'label' => $lang->ticket->keywords, 'width' => '160px', 'control' => 'text', 'required' => false, 'type' => 'string', 'ditto' => false, 'default' => '');
  54. $config->ticket->form->batchCreate['mailto'] = array('name' => 'mailto', 'label' => $lang->ticket->mailto, 'width' => '200px', 'control' => 'picker', 'required' => false, 'type' => 'array', 'ditto' => false, 'default' => array(''), 'multiple' => true, 'filter' => 'join');
  55. $config->ticket->form->batchEdit = array();
  56. $config->ticket->form->batchEdit['idIndex'] = array('name' => 'id', 'label' => $lang->idAB, 'width' => '50px', 'control' => 'index', 'required' => false, 'type' => 'int');
  57. $config->ticket->form->batchEdit['id'] = array('name' => 'id', 'label' => $lang->idAB, 'width' => '50px', 'control' => 'hidden', 'required' => false, 'type' => 'int', 'className' => 'hidden', 'base' => true);
  58. $config->ticket->form->batchEdit['title'] = array('name' => 'title', 'label' => $lang->ticket->title, 'width' => '200px', 'control' => 'input', 'required' => true, 'type' => 'string', 'default' => '');
  59. $config->ticket->form->batchEdit['product'] = array('name' => 'product', 'label' => $lang->ticket->product, 'width' => '200px', 'control' => 'picker', 'required' => false, 'type' => 'int', 'default' => 0);
  60. $config->ticket->form->batchEdit['module'] = array('name' => 'module', 'label' => $lang->ticket->module, 'width' => '200px', 'control' => 'picker', 'required' => false, 'type' => 'int', 'default' => 0);
  61. $config->ticket->form->batchEdit['pri'] = array('name' => 'pri', 'label' => $lang->ticket->pri, 'width' => '100px', 'control' => 'priPicker', 'required' => false, 'type' => 'int', 'default' => 0);
  62. $config->ticket->form->batchEdit['type'] = array('name' => 'type', 'label' => $lang->ticket->type, 'width' => '200px', 'control' => 'picker', 'required' => false, 'type' => 'string', 'default' => '');
  63. $config->ticket->form->batchEdit['assignedTo'] = array('name' => 'assignedTo', 'label' => $lang->ticket->assignedTo, 'width' => '150px', 'control' => 'picker', 'required' => false, 'type' => 'string', 'default' => '');
  64. $config->ticket->form->batchFinish = array();
  65. $config->ticket->form->batchFinish['idIndex'] = array('name' => 'id', 'label' => $lang->idAB, 'width' => '50px', 'control' => 'index', 'required' => false, 'type' => 'int');
  66. $config->ticket->form->batchFinish['id'] = array('name' => 'id', 'label' => $lang->idAB, 'width' => '50px', 'control' => 'hidden', 'required' => false, 'type' => 'int', 'className' => 'hidden', 'base' => true);
  67. $config->ticket->form->batchFinish['title'] = array('name' => 'title', 'label' => $lang->ticket->title, 'width' => '200px', 'control' => 'input', 'required' => true, 'type' => 'string', 'default' => '');
  68. $config->ticket->form->batchFinish['consumed'] = array('name' => 'consumed', 'label' => $lang->ticket->currentConsumed, 'width' => $isEn ? '140px' : '100px', 'control' => 'input', 'required' => false, 'type' => 'number', 'default' => 0);
  69. $config->ticket->form->batchFinish['resolvedDate'] = array('name' => 'resolvedDate', 'label' => $lang->ticket->resolvedDate, 'width' => '140px', 'control' => 'datetimePicker', 'required' => true, 'type' => 'datetime', 'default' => null);
  70. $config->ticket->form->batchFinish['resolution'] = array('name' => 'resolution', 'label' => $lang->ticket->resolution, 'width' => '300px', 'control' => 'input', 'required' => true, 'type' => 'text', 'default' => '');
  71. $config->ticket->form->batchFinish['comment'] = array('name' => 'comment', 'label' => $lang->comment, 'width' => '300px', 'control' => 'input', 'required' => false, 'type' => 'text', 'default' => '');
  72. $config->ticket->form->batchClose = array();
  73. $config->ticket->form->batchClose['id'] = array('name' => 'id', 'required' => true, 'type' => 'int', 'base' => true);
  74. $config->ticket->form->batchClose['closedReason'] = array('name' => 'closedReason', 'required' => false, 'type' => 'string', 'default' => '');
  75. $config->ticket->form->batchClose['repeatTicket'] = array('name' => 'repeatTicket', 'required' => false, 'type' => 'int', 'default' => 0);
  76. $config->ticket->form->batchClose['resolution'] = array('name' => 'resolution', 'required' => false, 'type' => 'string', 'default' => '');
  77. $config->ticket->form->batchActivate = array();
  78. $config->ticket->form->batchActivate['idIndex'] = array('name' => 'id', 'label' => $lang->idAB, 'width' => '50px', 'control' => 'index', 'required' => false, 'type' => 'int');
  79. $config->ticket->form->batchActivate['id'] = array('name' => 'id', 'label' => $lang->idAB, 'width' => '50px', 'control' => 'hidden', 'required' => false, 'type' => 'int', 'className' => 'hidden', 'base' => true);
  80. $config->ticket->form->batchActivate['title'] = array('name' => 'title', 'label' => $lang->ticket->title, 'width' => '200px', 'control' => 'input', 'required' => true, 'type' => 'string', 'default' => '');
  81. $config->ticket->form->batchActivate['estimate'] = array('name' => 'estimate', 'label' => $lang->ticket->estimate, 'width' => '100px', 'control' => 'input', 'required' => false, 'type' => 'number', 'default' => 0);
  82. $config->ticket->form->batchActivate['assignedTo'] = array('name' => 'assignedTo', 'label' => $lang->ticket->assignedTo, 'width' => '150px', 'control' => 'picker', 'required' => false, 'type' => 'string', 'default' => '');
  83. $config->ticket->form->batchActivate['comment'] = array('name' => 'comment', 'label' => $lang->comment, 'width' => '300px', 'control' => 'input', 'required' => false, 'type' => 'text', 'default' => '');
  84. $config->ticket->form->close = array();
  85. $config->ticket->form->close['closedReason'] = array('required' => false, 'type' => 'string', 'default' => '');
  86. $config->ticket->form->close['repeatTicket'] = array('required' => false, 'type' => 'int', 'default' => 0);
  87. $config->ticket->form->close['resolvedBy'] = array('required' => false, 'type' => 'string', 'default' => '');
  88. $config->ticket->form->close['resolvedDate'] = array('required' => false, 'type' => 'date', 'default' => '');
  89. $config->ticket->form->close['resolution'] = array('required' => false, 'type' => 'string', 'default' => '');