zentaolist.ticket.html.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace zin;
  3. $fnGenerateFormRows = function () use ($lang, $settings, $fnGenerateCustomSearch)
  4. {
  5. $productList = $this->loadModel('product')->getPairs();
  6. $productID = isset($settings['product']) ? (int)$settings['product'] : 0;
  7. $this->loadModel('ticket');
  8. $conditions = array_filter($lang->ticket->featureBar['browse'], function ($value) {
  9. return $value !== '-';
  10. });
  11. $conditions['customSearch'] = $lang->doc->customSearch;
  12. $searchConfig = $this->ticket->buildSearchConfig($productID);
  13. return array
  14. (
  15. formRow
  16. (
  17. formGroup
  18. (
  19. set::width('1/2'),
  20. set::name('product'),
  21. set::label($lang->doc->product),
  22. set::required(),
  23. set::control(array('contorl' => 'picker', 'required' => false, 'maxItemsCount' => 50)),
  24. set::items($productList),
  25. set::value($productID),
  26. span
  27. (
  28. setClass('error-tip text-danger hidden'),
  29. $lang->doc->emptyError
  30. )
  31. )
  32. ),
  33. formRow
  34. (
  35. formGroup
  36. (
  37. set::width('1/2'),
  38. set::name('condition'),
  39. set::label($lang->doc->searchCondition),
  40. set::required(),
  41. set::control(array('contorl' => 'picker', 'required' => false, 'maxItemsCount' => 50)),
  42. set::items($conditions),
  43. set::value(isset($settings['condition']) ? $settings['condition'] : ''),
  44. span
  45. (
  46. setClass('error-tip text-danger hidden'),
  47. $lang->doc->emptyError
  48. )
  49. )
  50. ),
  51. $fnGenerateCustomSearch($searchConfig)
  52. );
  53. };