selection_form.twig 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. {% if search_type == 'zoom' %}
  2. {% include 'table/search/form_tag.twig' with {
  3. 'script_name': 'tbl_zoom_select.php',
  4. 'form_id': 'zoom_search_form',
  5. 'db': db,
  6. 'table': table,
  7. 'goto': goto
  8. } only %}
  9. <fieldset id="fieldset_zoom_search">
  10. <fieldset id="inputSection">
  11. <legend>
  12. {% trans 'Do a "query by example" (wildcard: "%") for two different columns' %}
  13. </legend>
  14. {% include 'table/search/fields_table.twig' with {
  15. 'self': self,
  16. 'search_type': search_type,
  17. 'geom_column_flag': geom_column_flag,
  18. 'column_names': column_names,
  19. 'column_types': column_types,
  20. 'column_collations': column_collations,
  21. 'criteria_column_names': criteria_column_names,
  22. 'criteria_column_types': criteria_column_types
  23. } only %}
  24. {% include 'table/search/options_zoom.twig' with {
  25. 'data_label': data_label,
  26. 'column_names': column_names,
  27. 'max_plot_limit': max_plot_limit
  28. } only %}
  29. </fieldset>
  30. </fieldset>
  31. {% elseif search_type == 'normal' %}
  32. {% include 'table/search/form_tag.twig' with {
  33. 'script_name': 'tbl_select.php',
  34. 'form_id': 'tbl_search_form',
  35. 'db': db,
  36. 'table': table,
  37. 'goto': goto
  38. } only %}
  39. <fieldset id="fieldset_table_search">
  40. <fieldset id="fieldset_table_qbe">
  41. <legend>
  42. {% trans 'Do a "query by example" (wildcard: "%")' %}
  43. </legend>
  44. <div class="responsivetable jsresponsive">
  45. {% include 'table/search/fields_table.twig' with {
  46. 'self': self,
  47. 'search_type': search_type,
  48. 'geom_column_flag': geom_column_flag,
  49. 'column_names': column_names,
  50. 'column_types': column_types,
  51. 'column_collations': column_collations,
  52. 'criteria_column_names': criteria_column_names,
  53. 'criteria_column_types': criteria_column_types
  54. } only %}
  55. </div>
  56. <div id="gis_editor"></div>
  57. <div id="popup_background"></div>
  58. </fieldset>
  59. {% include 'table/search/options.twig' with {
  60. 'column_names': column_names,
  61. 'max_rows': max_rows
  62. } only %}
  63. </fieldset>
  64. {% elseif search_type == 'replace' %}
  65. {% include 'table/search/form_tag.twig' with {
  66. 'script_name': 'tbl_find_replace.php',
  67. 'form_id': 'find_replace_form',
  68. 'db': db,
  69. 'table': table,
  70. 'goto': goto
  71. } only %}
  72. <fieldset id="fieldset_find_replace">
  73. <fieldset id="fieldset_find">
  74. <legend>
  75. {% trans 'Find and replace' %}
  76. </legend>
  77. {% include 'table/search/search_and_replace.twig' with {
  78. 'column_names': column_names,
  79. 'column_types': column_types,
  80. 'sql_types': sql_types
  81. } only %}
  82. </fieldset>
  83. </fieldset>
  84. {% else %}
  85. {% include 'table/search/form_tag.twig' with {
  86. 'script_name': '',
  87. 'form_id': '',
  88. 'db': db,
  89. 'table': table,
  90. 'goto': goto
  91. } only %}
  92. {% endif %}
  93. {# Displays selection form's footer elements #}
  94. <fieldset class="tblFooters">
  95. <input type="submit"
  96. name="{{ search_type == 'zoom' ? 'zoom_submit' : 'submit' }}"
  97. {{ search_type == 'zoom' ? 'id="inputFormSubmitId"' }}
  98. value="{% trans 'Go' %}" />
  99. </fieldset>
  100. </form>
  101. <div id="sqlqueryresultsouter"></div>